Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic Color in Grid
Message
From
22/07/1999 15:24:15
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Dynamic Color in Grid
Miscellaneous
Thread ID:
00244921
Message ID:
00244921
Views:
55
I have a grid on a form that sets the dynamicbackcolor and dynamicfore color in the init event of the grid as follows:

public grno
grno = recno()
this.setall('DynamicBackColor','iif(recno()=grno,rgb(128,128,255),rgb(255,255,255))','Column')
this.setall('DynamicForeColor','iif(deleted(),rgb(255,0,0),rgb(0,0,0))','Column')

In the afterrowcolchange event I have:

grno = recno()
this.refresh()

The results of this is that when the user moves through the records in the grid the entire row shows with the background color (128,128,255) and all the rows have the fore color of 0,0,0 except for deleted records which are 255,0,0.

All of this is fine until the user clicks in the grid. When they click the back color changes to white(255,255,255) and the fore color to black (0,0,0). Is there a way to make the colors stay the same as what is set dynamically?
Mark Johns
Next
Reply
Map
View

Click here to load this message in the networking platform