Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Row Color
Message
 
À
17/05/1998 06:33:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00099843
Message ID:
00100031
Vues:
104
>>Hi Rick,
>>
>>To elaborate a bit on Ed's response, I am sure you would like to see an example of how DynamicBackColor and DynamicForeColor Properties work.
>>
>>This example toggles the backcolor of a column based on whether the value of recno() is even or odd: Iif(mod(recno(),2)=0,rgb(255,0,0),rgb(255,255,255)). In code, you would do something like:
>>
>>frmFoo.Grid1.Column1.DynamicBackColor = ;
>> "Iif(mod(recno(),2)=0,rgb(255,0,0),rgb(255,255,255))"
>>
>>Or... you can issue this code:
>>
>>frmFoo.Grid1.Setall("dynamicbackcolor", "Iif(mod(recno(),2)=0,rgb(255,0,0),rgb(255,255,255))","column")
>>
>>Just replace the Iif expression with the logical value stored in the table.
>
>
>OK,
>
>BUT , how about multiple row color ??
>
>eg. when xx=1 then color=red
> when xx=2 color=bleu
> xx=3 color=green
>...
>
>Greetings,
>
>Marc


Marc

Use:

IIF(xx=1,rgb(255,0,0),IIF(x=2,rgb(255,0,0),rgb(255,255,255))

change the 255,0,0 to the Blue numbers for the x=2
Richard DeZeeuw
DeZeeuw Software Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform