Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to NOT change DynamicBackColor
Message
De
23/02/2005 19:34:45
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
23/02/2005 02:58:14
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:
00989907
Vues:
34
>>this.column4.DynamicBackColor = 'iif(duedate < DATE(),RGB(255,50,50),this.column4.DynamicBackColor)'
>
>Try this instead:
>this.column4.DynamicBackColor = 'iif(duedate < DATE(),RGB(255,50,50),'+this.column4.DynamicBackColor+')'
>
>This is assuming, that this.column4.DynamicBackcolor is already set to some expression resulting in a color.

That's exactly what I meant to suggest.

>If it get's too complex, maybe create a function in the form, that you call from DynamicBackcolor:
>this.column4.DynamicBackColor = 'thisform.columncolor(duedate)'
>
>* thisform.columncolor method:
>LPARAMETERS tdDueDate
>...
>Return RGB(...)

I've seen this used, even at framework level, but if the grid has a sufficient number of rows, method call overhead can make grid refreshes slow. Most probably nothing to worry about on today's machines, but just try that with debugger open... it won't matter whether you have the coffee ready, you'll have time enough to brew some.

The fastest trick I've found so far is to add an integer column, let's name it iColor, in the table, and to fill it with rgb() values as needed. Then the dynamic backcolor expresion becomes "alias.iColor" - works like a charm, and you can have as many different colors as you like.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform