XBrowse alternating row colors

User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

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
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

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
Maurizio
Posts: 705
Joined: Mon Oct 10, 2005 1:29 pm
Contact:

Post by Maurizio »

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
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

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
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

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
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

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
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

Yes
Regards

G. N. Rao.
Hyderabad, India
Post Reply