Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to NOT change DynamicBackColor
Message
De
23/02/2005 05:28:50
 
 
À
23/02/2005 01:21:23
Randy Wessels
Screentek Business Solutions, Llc.
Phoenix, Arizona, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00989507
Message ID:
00989537
Vues:
20
>Hopefully this is a quick one for you experts out there. I have a grid that has several fields that have their color set in a complex way that I don't understand, but it works. I have a need to override the colors of certain columns based on an overdue date. I have code that works BUT it always sets makes the color either red or white and I need it to make it red if a condition is met and NOT change it from what it is if the condition is not met.
>
>Here is my code that changes it to Red - But also can change it to white:
>
>this.column4.DynamicBackColor = 'iif(duedate < DATE(),RGB(255,50,50),RGB(255,255,255))
>
>Here is the code that I thougth would work but doesn't:
>
>this.column4.DynamicBackColor = 'iif(duedate < DATE(),RGB(255,50,50),this.column4.DynamicBackColor)'
>
>Here is something else that gives me a variable undefined:
>
>IF duedate < DATE()
> this.column4.DynamicBackColor = RGB(255,50,50)
>ENDIF
>
>Any help is appreciated.
>
>Thanks,
>
>Randy

Hi Randy, you cannot control the order of DynamicBackColor evaluations,
then, you can
- ADDPROPERTY(GRID,"Last4DynamicBackColor",0)
- This.column4.DynamicBackColor = 'this.Get4DynamicBackColor()'
- add a method
Grid.Get4DynamicBackColor
if duedate < DATE()
 THIS.Last4DynamicBackColor = RGB(255,50,50)
ENDIF
 RETURN m.THIS.Last4DynamicBackColor 
but this not work.

Fabio
th
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform