Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Cell Colors
Message
From
10/01/2008 18:12:11
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
10/01/2008 18:02:27
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01280982
Message ID:
01281032
Views:
28
>>>>It seems that though oColorBox.BackColor has a value set of "255,255,255" when it gets elsewhere, it has a converted value of 16777215 (numeric). I need to assign the DynamicBackColor in the grid to be the same as oColorBox.
>>>>
>>>>First, how? Second, why would it get implicitly converted?
>>>>
>>>>
>>>>	.grdAppointmenttypeset.Column10.DynamicBackColor = oColorBox.BackColor
>>>>
>>>
>>>
>>>.grdAppointmenttypeset.Column10.DynamicBackColor = [IIF(.t., oColorBox.BackColor. 0)]
>>>
>>>?
>>
>>I'm sorry, I don't understand how that helps. Is it the brackets that make it work somehow? Other than that it's just a conditional.
>
>DynamicBackColor = cExpression
>cExpression

>"Specifies an expression in quotation marks that is re-evaluated at run time whenever the Grid control is refreshed. The run-time evaluation must result in a single color value. "
>
>
>
>The brackets in this case are the text delimiters. I've never gotten used to seeing them used this way and it's one of my petty peeves about style. My first thought is always that it's an array call - even when that clearly couldn't be the intent of the code.

Ok, I finally figured that out, but I never used them that way. I'm getting an error that I'm not using a valid DynamicBackColor when the grid refreshes.

This is my line:
	.grdAppointmenttypeset.Column10.DynamicBackColor = [IIF(.T., THISFORM.oColorBox.BackColor, 0)]
oColorBox.BackColor is a numeric value that seems to have converted itself from an RGB.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform