Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid font color
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00872757
Message ID:
00872772
Vues:
23
Chaim

>Who can help me?
I can help you :-)

>How can I change the forecolor of the fonts in the grid by the value.
>I entered the following code in the grid\cell\refresh but it's not working.
>HERE IS THE CODE:
>
tv=left(allt(this.value),3)
>do case
>case len(tv)<3
>	this.forecolor=rgb(255,255,255)
>case tv='AAA'
>	this.forecolor=rgb(255,255,128)
>case tv='BBB' or tv='CCC'
>	this.forecolor=rgb(255,0,0)
>endcase
You should use DynamicForeColor in grid for that. You can also set it all by putting something like the following in your Grid's Refresh code:
*** assuming the record value is named mytable.myval
This.SetAll("DynamicForeColor","iif(len(mytable.myval)<3,rgb(255,255,255),iif(mytable.myval='AAA',rgb(255,255,128),rgb(255,0,0)))"
Of course, you could do the same with DynamicBackColor for the backcolor, etc...

HTH
Jaime
Why do programs stop working correctly as soon as you leave the Fox?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform