Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid color
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00184473
Message ID:
00185399
Views:
38
>Erik,
>Yes, the SetAll() code as you wrote it works fine. What I have is FIRST a SetAll() with 3 nested IIF() statements. This worked fine, after I got all the parens and commas in the right place. Then we decided to give the enduser control over their colors, so instead of RGB(255,0,0) it would be "nBackColor" where nBackColor was picked with GetColor() and was a numeric value.
>

Actually, this is the exact thing that got me stuck. I was attempting to store "RGB(whatever)" in a custom grid property (Grid.HighlightColor), and then use this property to assign the DynamicProperty. So the actual statement looked like:

THIS.SetAll("DynamicBackColor","IIF(this.grdcurrow = RECNO(this.recordsource), this.highlightcolor, this.backcolor)","Column")

This didn't work, so I ended up just storing the integer color value in the property instead. Looking back, I should have tried EVAL(THIS.HighlightColor), instead of just the property, because the property just thought that RGB(255,0,0) was a text string. But then again throwing EVAL into the SetAll and Dynamic mix could have just screwed things up more. Things work fine the way I have them though, I can still use GETCOLOR(), I just store the value directly in the property.

Interesting how we found 2 similar but different solutions to the same problem.

>If anyone is interested in the PRG that takes a GetColor() number and returns the 3 RGB parameters let me know by e-mail.
>

Too late- I already wrote mine... thanks for the offer though.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform