Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Howto color individual cells in a grid
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows NT
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00992278
Message ID:
00992416
Views:
17
>>Hello Everybody.
>>
>>since the DynamicBackColor (discussed in thread #992235) does not seem to wok for me, is there a way to dynamicly change the backcolor of each cell in a grid based on its current value?
>>
>>thank you for your help in advance!
>
>Gunnar, something like this in the init of the grid would work for you?
>
>
>FOR EACH loColumn IN this.Columns
>	lcCS = 'this.' + loColumn.Name + '.ControlSource'
>	IF TYPE(EVALUATE(lcCS)) = 'N'
>		loColumn.DynamicBackColor = [IIF(EVALUATE(] + lcCS + [) < 10, RGB(225, 128, 128), RGB(128,255,128))]
>	ENDIF
>ENDFOR
>
Hello Hugo

This looks very close to Cetin's response, which is the one i am using now. i like the idea of calling a method (which i have been using in another area).

going through all the responses i've received, looks i was the only one noot knowing how to do this {ashamed smile}.

thank you for your help!
Previous
Reply
Map
View

Click here to load this message in the networking platform