Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change Background color on ONE cell.
Message
 
To
12/02/2002 14:58:55
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00618941
Message ID:
00619089
Views:
17
>So how can I change the background color of a cell that is disabled and not the current focus?
>
>David

DynamicBackColor should do it, as Antonio and Nadya noticed.
For example:
* Grid.Init
this.column3.DynamicBackColor = "IIF(mycondition = somevalue, RGB(255,0,0), RGB(255,255,255))"
For the grid cell which does not have a focus it has to show the appropriate backcolor. It does not matter whether column and/or column textbox is enabled or disabled, or the column is read-only (or any combination of these properties settings).

I would rather check your IIF expression and how you actually write it.
For example this expression will work:
this.column3.DynamicBackColor = "IIF(mycondition = somevalue, RGB(255,0,0), RGB(255,255,255))"
and this will not:
this.column3.DynamicBackColor = "IIF(mycondition = somevalue, RGB(255,0,0), RGB(255,255,255)) "
The reason is in one extra space in the IIF expression between the last bracket and closing quote.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform