Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting DynamicBackColor in a grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01354447
Message ID:
01354450
Vues:
36
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform