Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Column Data ForeColor
Message
 
 
To
29/10/2009 02:50:12
Paul Ong
Knights of Christ Foundation
California, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01431831
Message ID:
01432183
Views:
55
>I was very curios so what i did was i put in a button procedure. and then i would reverse its effect on the next click, however, on click i get an error message, something wrong with the code below?
>
>error:
>Expression is invalid,
>
>btw. so you mean i can call the same proc over and over again?
>
>thisform.bASGRID1.Column7.DynamicForeColor=[IIF(tPoDetail.solastwk=0,IIF(MOD(tPoDetail.nrowid,2)=0,RGB(228,228,288),RGB(255,255,255)),RGB(0,0,255))]
>
>thanks in advance...
>

Agnes found a typo in your RGB - it should be RGB(228,228,228). You don't need to put it in procedure or button - you need to do it only once in either grid or form's Init.

If you want ti verify the expression, then
lnColor = IIF(tPoDetail.solastwk=0,IIF(MOD(tPoDetail.nrowid,2)=0,RGB(228,228,228),RGB(255,255,255)),RGB(0,0,255))
=messagebox('Color on this row is ' + transform(lnColor)) && to verify
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform