Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alternating colors in Grids
Message
From
25/02/2004 09:43:40
 
 
To
25/02/2004 09:18:34
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00880671
Message ID:
00880683
Views:
9
What happens if you issue the setall() again, after the re-ordering?

>We use the following code to alternate the colors of the lines in a grid, i.e. Yellow, Green, Yellow, etc. It works great, until we sort the cursor using a temporary index. After re-ordering, RECNO() is no longer 1,2,3... but could be 2,4,3.. which messes up the alternating colors. Does anyone know of a way to dtermine the actual physical row number in the grid instead of using the record number from the cursor? This would guarantee the lines would alternate under all conditions. Or any other ideas to help make this work?
>
>Thanks,
>
>Bryan A. Jackson
>for Rudy Nieves
>
>THIS.SetAll( "DynamicBackColor", IIF( MOD( RECNO(), 2 ) = 0, RGB(187,217,168), RGB(255,255,190) )", "Column" )
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Reply
Map
View

Click here to load this message in the networking platform