Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DynamicBackColor
Message
 
To
15/06/1999 19:29:12
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00230222
Message ID:
00230251
Views:
18
Jill,
First add a form property "nActiveRow" to store the active record # in the grid. Be sure you initialize it to a number.

Second, in the form Init (or grid init)
THIS.SETALL("DYNAMICBACKCOLOR",;
   "IIF(recno() = thisform.nActiveRow, ;
   RGB(192,192,192),RGB(255,255,255))","column")
Next, update the nActiveRow value when you change rows in the grid. Put code in the AfterRowColChange method:
thisform.nRow = recno()
this.refresh
HTH
Barbara

>How can I set the back color in a grid of the row that is selected.
>I think it is something like this:
>In MyGrid.Init
>THIS.SETALL("DYNAMICBACKCOLOR",;
> "IIF(THIS.Parent.activerow = recno();
> ,RGB(192,192,192),RGB(255,255,255))","column")
>
>In this case I get an "expression is invalid" error.
>
>Does anyone have an easy way to do this?
>Jill
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform