Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alternating Colors in Grids
Message
 
To
27/02/2006 13:47:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
Miscellaneous
Thread ID:
01098730
Message ID:
01099713
Views:
25
My coworker came up with a great idea, although I am still optimizing and debugging it:

1) Create a property on the form (ThisForm.lShaded, .F.)
2) Create a method on the form (ThisForm.GridColors):
*GridColors
ThisForm.lShaded = !ThisForm.lShaded
RETURN IIF(ThisForm.lShaded, RGB(253,244,193), RGB(255,255,255))
3) Set the Columns' DynamicBackColor to: ThisForm.GridColors()

Result: Column instantly alternates colors, regardless of table size.

I am still working on fixing a bug whereby clicking on a row makes the colors go out of sync. I also have to test applying it to other columns, which shouldn't be hard.

Jerry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform