Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Backcolor of single grid textboxes
Message
From
04/04/2008 04:12:03
 
 
To
04/04/2008 03:16:34
Albert Beermann
Piepenbrock Service Gmbh & Cokg
Osnabrück, Germany
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
MySQL
Miscellaneous
Thread ID:
01308167
Message ID:
01308175
Views:
10
Hi Albert,

try it like this:
Thisform.Grid1.Column3.DynamicBackColor = [ThisForm.SetBackColor(amount)]
Within Thisform.SetBackColor you can define the Backcolor with regular Code, which can be handled much better than IIF or ICASE within the property itself.
LOCAL liReturn

DO CASE 
CASE amount < 100
	liReturn = RGB(255,0,0)
CASE BETWEEN(amount,100,1000)
	liReturn = RGB(255,255,255)
CASE amount > 1000 
	liReturn = RGB(0,255,0))
ENDCASE 

RETURN liReturn
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Previous
Reply
Map
View

Click here to load this message in the networking platform