Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Coloring grid cells
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01510768
Message ID:
01510775
Views:
81
This message has been marked as a message which has helped to the initial question of the thread.
>>mygrid.column1.dynamicbackcolor="iif(somecondition,rgb(50,255,0),rgb(255,255,255))"
>this command colors the whole column. I need a single color to be coloured. What if I wanted to have a chess board in a grid ?

you have to use the somecondition part to get whatever pattern you want.

For example, grid bound to a cursor could achieve chessboard pattern with something like:
mygrid.column1.dynamicbackcolor="iif(mod(recno('mycursor'),2)=0,rgb(0,0,0),rgb(255,255,255))"
mygrid.column2.dynamicbackcolor="iif(mod(recno('mycursor'),2)=1,rgb(0,0,0),rgb(255,255,255))"
mygrid.column3.dynamicbackcolor="iif(mod(recno('mycursor'),2)=0,rgb(0,0,0),rgb(255,255,255))"
mygrid.column4.dynamicbackcolor="iif(mod(recno('mycursor'),2)=1,rgb(0,0,0),rgb(255,255,255))"
Don't forget to set Sparse to .F.
Brandon Harker
Sebae Data Solutions
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform