Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alternating Colors in Grids
Message
 
À
27/02/2006 13:47:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8
Divers
Thread ID:
01098730
Message ID:
01099713
Vues:
26
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform