Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conditionally color options in a option box
Message
From
27/05/2012 06:57:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
26/05/2012 14:19:56
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 7
Network:
Windows 2000 Server
Database:
Visual FoxPro
Application:
Web
Miscellaneous
Thread ID:
01544512
Message ID:
01544522
Views:
67
>Hi. I am trying to conditionally set colors in an option box text. For example, RED if out of stock.
>
>I put the following code in the option1.backcolor property (as a test)
>
>=IIF(crsQuoteList.qtynew<=0,255,0)
>
>Thanks, Randy

I suppose that is the correct approach. However, setting this in the properties window would have it evaluated only once, when the form starts. You'll have to recalculate the color, for example, in the object's Refresh() event, or when changing records.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform