Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid and colors
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00669612
Message ID:
00669685
Views:
9
This message has been marked as the solution to the initial question of the thread.
>Hi
>
>Imagine :
>I have a table1 only with 2 records .
>I have a grid1 , recordsource = table1 .
>
>So , grid1 , have two records . One record have the focus in moment .
>The record , that not have the focus , have the same color , that rows that haven´t any information .
>Imagine , in grid1 :
>row1 ( record1) - is gray
>row2 ( record2) - is blue ( because has the focus )
>row3 - no data - is gray
>
>How can i , make row3 ( no data ) have other color , and not the same color row1 ?
>
>Thanks

You need to use a combination of setting the grid columns DynamicBackColor and column.BackColor. You can set all column.backcolor to grey - that will be the color of your grid rows with no data. The DynamicBackColor expression will paint the current record in selected color (say, red), and other records in some other color (for example blue).

Depending on the desired condition, something like:
* Form.Init()
THISFORM.grid1.SETALL("Backcolor", RGB(192,192,192),"Column")
THISFORM.grid1.SETALL("DynamicBackColor", "IIF( my_condition_here , RGB(255,0,0), RGB(0,0,255))","Column")
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
Reply
Map
View

Click here to load this message in the networking platform