Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic Grid Color
Message
De
29/03/2001 20:56:05
 
 
À
29/03/2001 20:29:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00490152
Message ID:
00490156
Vues:
10
You can set it to a method call.
Say you want it a different color for different days of the week,

the method:
** GridColor
LParameters tcDay

Do Case
Case tcDay = "Sunday"
     lnRetVal = RGB(255,255,0)
Case tcDay = "Friday"
     lnRetVal = RGB(0,0,255)
Case tcDay = "Monday"
     lnRetVal= RGB(0,255,255)
Case tcDay = "Thursday"
     lnRetVal = RGB(0,255,0)
Otherwise
     lnRetVal = RGB(255,255,255)
EndCase
Return lnRetVal
To set it:
this.SetAll("DynamicBackColor", "thisform.GridColor(dates.cday)")
then something similar for the fore colors...
HTH

>Help....
>
>I have been tring to create a grid that will change foreground and backcolors of the fields based on the data in thw database. I have tried using IIf statements and they work if I want only 2 color options, I am tring to get a total of 4 color options for each the foreground and the background.
>
>I have tried using case statements but then the grid does nothing.
>
>Any ideas??????
>
>Rich
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform