Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change forecolor in grid
Message
De
31/01/2002 14:54:30
 
 
À
31/01/2002 13:34:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00613552
Message ID:
00613620
Vues:
10
Hello Peter.

I want to change the forecolor in a grid based on a criteria. The grid contains 5 column, the fifth column contains numbers between 1 to 5. The color changed based on the number
eg 1 - blue/white
2 - green/white
3 - red/white etc.



Suppose column5 is bound to a field called Field5 in an alias called MyAlias that is being used as the grid's RecordSource:

This code in the grid's Init():
This.Column5.DynamicForeColor = ;
  "IIF( MyAlias.Field5 = 1, RGB( 0, 0, 255 ), IIF( MyAlias.Field5 = 3, RGB( 0, 255, 0 ), RBG( 255, 0, 0 ) ) )"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform