Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Different colors in a Grid's Row
Message
From
29/08/1999 22:01:22
 
 
To
29/08/1999 21:50:17
Victor Lapid
Phil. Long Distance Tel. Co.
Manila, Philippines
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00259016
Message ID:
00259017
Views:
17
Hi Victor,

>I've wanted my Grid's row to have five sets of different colors -->highlight,(i.e blue,red,green,yellow and brown) depending on the values of my field's row, let's say (>10-blue,>20-red,>30-green and so forth). This would enable the users to have a visual clue on the data they are viewing on the grid.

Use the DynamicBackColor and DynamicForeColor properties,
grdGrid.Column1.DynamicBackColor = 'iif(eval(MyTable.MyField) > 10, rgb(0,0,255),rgb(255,0,0))
You will probably have many nested iif()s in your code due to the many number of colors you want. Do you want only the highlighted record to have a no-default color, or different colors up and down the board?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform