Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Machine dependent color error with a grid
Message
 
To
24/02/2008 17:00:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01295947
Message ID:
01295957
Views:
21
>>>I’m setting background colors in a grid so that some rows are a light green, and the rest are the normal white. It works fine on my machine (with an old simple screen card), but fails on my user’s newer machines. Here’s the code from the form’s Init():
>>>
>>>thisform.grdTheGarment.SetAll( ;
>>>  "DynamicBackColor",;
>>>  "iif(cType = 'L', rgb(225,255,226), rgb(255,255,255))",;
>>>  "Column")
>>>
>>>The error message is in an Ok/Cancel messagebox, and says:
>>>Expression is invalid. Use a valid
>>>expression for DYNAMICBACKCOLOR
>>>property.
>>>
>>>My user clicks on Ok 3 times, the messagebox disappears, and the form displays, but with a reported different green in the grid than requested. A separate textbox on the same form uses the same requested rgb(225,255,226) light green too, but shows the color correctly.
>>>
>>>Any thoughts?
>>
>>What is cType?
>
>lv_LocGarDef is the RecordSource for the grid. cType (lv_LocGarDef.cType) is one of the fields in the the grid's RecordSource.

Then use the full qualified field name:
thisform.grdTheGarment.SetAll([DynamicBackColor], [iif(lv_LocGarDef.cType = 'L', RGB(225,255,226), RGB(255,255,255))],[Column])
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform