Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Forecolor flexibility in grid
Message
De
27/01/1999 05:37:18
 
 
À
15/01/1999 03:04:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00176326
Message ID:
00180647
Vues:
20
>Hi Peter.
>
>It's possible to change the colour of fonts or whatever
>in columns of Grid.
>
>See Dynamicforecolor and DynamicBackColor.
>
>For example
>
>Grid.Column(n).Dynamicforecolor = ;
> 'IIF(myTbl.sum = 6 ,RGB(255,0,0),RGB(0,0,255))'
>
>Grid.Column(n).DynamicBackcolor = ;
> 'IIF(myTbl.sum = 6 ,RGB(0,0,0),RGB(255,255,255))'
>
>The code above would make column(n)'s font color RED
>and back color BLACK if myTbl.sum is 6.
>
>Good Luck .


Dear Mr. Park,

I came across this little pearl also and naturally tried to massage it a little.

Grid.Column(n).Dynamicforecolor = ;
'IIF(myTbl.sum = 6 ,RGB(255,0,0),RGB(0,0,255))'

I would like the "rgb(255,0,0)" to be as dynamic as the "myTbl.sum = 6 ". So I created a field in the view that runs the grid to hold the color of the backcolor I would like the field to be displayed in ie:

Grid.Column(n).Dynamicforecolor = ;
'IIF(v_apptbookframe.'REC' ,RGB(v_apptbookframe.ccolor_1),RGB(0,0,255))'

This doesn't bomb but the grid does not colorize.

If you store '255,0,0' to testcolor
Then substitute testcolor for the rgb clause ie:

Grid.Column(n).Dynamicforecolor = ;
'IIF(v_apptbookframe.'REC' ,rgb(&testcolor) ,RGB(0,0,255))'

this runs but then if you try the same thing with the view variable ie:

Grid.Column(n).Dynamicforecolor = ;
'IIF(v_apptbookframe.'REC' ,rgb(&v_apptbookframe.ccolor_1) ,RGB(0,0,255))'
the grid does not get colorized.


Any ideas?

NeilGorin
Dadigidoc@aol.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform