Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid DynamicBackColor
Message
De
22/01/2008 09:20:41
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
21/01/2008 22:27:51
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01283894
Message ID:
01283971
Vues:
21
>Trying to set the DynamicBackColor in a grid to a value in a cursor.
>
>
>MyCursor.Sch_BackColor = "RGB(111,222,333)"
>
>
>Hardcoded into the formula works:
>
>
>="IIF( .T., RGB(111,222,333), 0)"
>
>
>These do not:
>
>
>="IIF( .T., Sch_BackColor, 0)"
>="IIF( .T.," + TRANSFORM(Sch_BackColor) + ", 0)"
>="IIF( .T., EVAL(Sch_BackColor), 0)"
>
>
>How do I do this? Thanks!

Is your cursor the underlying cursor of the grid, or at least related to it? Then it's much simpler than you thought. Make sure that sch_backcolor is an integer or at least long enough numeric field - n(8,0) would suffice.

replace myCursor.sch_backcolor with rgb(111,222,333)

then

dynamicbackcolor="myCursor.sch_backcolor"

no iif()s, no icases, no calculations - you have the value and it's stored in the field, so your dynamic expression is just the field. And it refreshes your grid so much faster than when you have a method call in the expression. An iif() is not so bad, speedwise, but nothing beats a simple field.

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
Répondre
Fil
Voir

Click here to load this message in the networking platform