Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Different colors in a Grid's Row
Message
From
30/08/1999 10:23:17
 
 
To
30/08/1999 04:26:45
Victor Lapid
Phil. Long Distance Tel. Co.
Manila, Philippines
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00259016
Message ID:
00259156
Views:
19
Hi Victor,

>But what i want is that, by default there is no backcolor on the grid's row, but when I set the focus on the grid and move the record pointer it automatically changes the backcolor instantly (depending on the field's value of the Grid's row).

OK, thats what I was thinking, this is what you'll have to do:

1. Create a property (nRecord) for your grid

2. On Init, set the Property to RECNO(Grid.RecordSource) or the specific alias if you wish.

3. Then on AfterRowColChange, add: This.nRecord = RECNO(Grid.RecordSource)

4. Finally your IIF() should look like this:
DynamicBackColor = "iif(<i>RECNO(This.RecordSource) = This.nRecord</i> and Value > 10, RGB(255,0,0), RGB(0,0,0))"
You will probably want a case statement to make the many colors easier to read then 4 or 5 nested IIF()s

Does this help?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform