XBrowse alternating row colors

Postby nageswaragunupudi » Thu Jan 24, 2008 10:43 am

OrdKeyNo() always works.
If we are browsing arrays we should consider Array row number. Like that depending on what we browse we shoud write the code.

But we were looking for a common solution which works irrespective of the data source being browsed.

It is good if we can make our code for common tasks as generic and as reusable as possible. That improves the productivity of normal application development.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10648
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby James Bott » Thu Jan 24, 2008 11:18 am

NageswaraRao,

>But we were looking for a common solution which works irrespective of the data source being browsed.

Agreed. I haven't found a good common solution. I just posted the OrdKeyNo() as a temporary solution for DBFs.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Maurizio » Tue Jan 29, 2008 4:56 pm

Hello James

I try your sample

oBrw:bClrStd:= {|| if( (cAlias)->(ordkeyno()) % 2 == 0 ,{ CLR_BLACK, COLOR_LIGHT },{ CLR_BLACK, COLOR_DARK }) }

works fine but if you keep press the key ARROW DOWN after the first page the color remain the same .

Regards Maurizio
User avatar
Maurizio
 
Posts: 825
Joined: Mon Oct 10, 2005 1:29 pm

Postby James Bott » Tue Jan 29, 2008 5:53 pm

Maurizio,

It works fine here with the down arrow. Are you using my example code or did you put this into your own program? I suggest trying my example program listed in a previous message.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby nageswaragunupudi » Tue Jan 29, 2008 6:05 pm

Mr James

The logic fails to work when the number of visible rows is an odd number. Continuous colors can be seen in many ways of navigation.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10648
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby James Bott » Tue Jan 29, 2008 6:40 pm

NageswaraRao,

>The logic fails to work when the number of visible rows is an odd number. Continuous colors can be seen in many ways of navigation.

I think you are referring to my lClrFlag method, not the OrdKeyNo() method. The ordKeyNo() should not be affected by the number of rows visible in the browse. With ordKeyNo() and 13 visible rows, I do not see the problem.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby nageswaragunupudi » Tue Jan 29, 2008 6:41 pm

Yes
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10648
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 22 guests