Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Colors in a GRID rows
Message
From
10/06/1998 11:48:35
 
 
To
10/06/1998 11:38:53
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00106791
Message ID:
00106800
Views:
27
>Hi to all
>i have a grid that shows fields of a table (the table has 4 fielsd)
>that table has a field (numeric) called " State"
>
>how can i do to make that the grid shows difetrent forecolors
>to any kind of "state" ?
>
>thats it:
>if state =1 forecolor =red (all the records of state 1 may have forecolor red)
>if estate =2 forecolor = blue(all the records of state 2 may have forecolor blue)
>if state =3 forecolor =green (all the records of state 3 may have forecolor green)
>..... etc
>
>that colors can be changed usin a menu options called "SETTINGS COLORS"
>where y can select any color .. wathever i want.
>
>the color got to be showed in ALL THE ROW of the record of the grid
>
>(all the row with the Same color)
>
>Im trying to make this but i dont know how
>if anybody can show me some way to make this i really thanks
>A.M G

To change colors you should use DynamicFore/BackColor properties:
***Grid.Init event
this.setall('dynamicforecolor','thisform.setgridcolor()','column')
***Form.Setgridcolor method
do case
case table1.state="NY"
return 255
case table1.State="NJ"
return 128
otherwise
return 65535
endcase
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform