Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setall method
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00729337
Message ID:
00729341
Views:
15
Hi,

>grid.setall("DynamicBackColor","iif(condition,KbgcolNormal,Kbgcolevid","column")

you're having the compile time constants between quotation marks, so they are treated as string literals. Try this:
grid.setall("DynamicBackColor","iif(condition, " + KbgcolNormal + ", " + Kbgcolevid, "column")
HTH,
Armin


>I have to dynamically change the backcolor in a grid
>I usually do it by the method setall for example :
>grid.setall("DynamicBackColor","iif(condition,rgb(192,192,192),rgb(255,0,0)","column")
>
>Today i was trying to get color from an include file but i get an error.
>i wrote
>grid.setall("DynamicBackColor","iif(condition,KbgcolNormal,Kbgcolevid","column")
>
>Can I use constant or variable inside the setall method and if so
>where is the mistake ?
>
>Thanks
>Alessio

Armin Neudert
Regional Director (Stuttgart) of German FoxPro User Group dFPUG

MCP for Visual FoxPro

Expert/Editor of the VFP section in the German Codezone community portal
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform