Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting DynamicBackColor in a grid
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01354447
Message ID:
01354450
Views:
35
>Hi,
>
>I want to set column's Dynamic Back Color to my chosen color when records meet the criteria, otherwise I want to use the default grid color (and the currently highlighted record should be highlighted with the normal highlight color).
>
>How can I get the "regular" color for the grid rows?
>
>Thanks.

There is no such thing like "Row color" All colors belongs to COLUMNS :-) And if you don't know them nobody can :-))))
You could use a form method to store DynamicBackColor:
*** Somewhere in Form Init:
thisform.Grid1.SetAll([DynamicBackColor],[thisform.SetColumnColor()],[Column])




**** Form SetColumnColor method:
LOCAL lnRGBValue
DO CASE
   CASE SomeCriteria1
        lnRGBValue = RGB(the color you want)
   CASE SomeCriteria2
        lnRGBValue = RGB(the color you want)
OTHERWISE
        lnRGBValue = thisform.Grid1.Columns(thisform.Grid1.ActiveColumn).BackColor
ENDCASE
RETURN lnRGBValue
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform