Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid DynamicBackColor
Message
From
22/01/2008 09:20:41
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
21/01/2008 22:27:51
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01283894
Message ID:
01283971
Views:
20
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform