Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid row selected
Message
From
13/08/2002 14:04:33
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00687200
Message ID:
00689259
Views:
27
I was playing around with a grid and ended up adding the following to it:

thisform.grid1.setall('dynamicbackcolor', 'iif(thisform.grid1.activerow = thisform.grid1.activerow, rgb[0,64,128], rgb[255,255,255])', 'column')

thisform.grid1.setall('dynamicforecolor', 'iif(thisform.grid1.activerow = thisform.grid1.activerow, rgb[255,255,255], rgb[0,0,0])', 'column')

This did the highlighting the way I wanted pretty well, although sometimes the grid would momentary display all rows highlighted - something I'm sure could be fixed (if your picky like me).

Thanks for your code! I build most of my grids at runtime using a table. The table stores the property names and values for the grid. At runtime the table is scanned and using macro substitution the properties are defined for the grid. This way, at runtime, the user can go into a setup screen and change the properties for their grid to suite their needs and it instantly changes the appearance of grid. And being the data is in a table their settings will stay that way until they decide to change it again.
Also, in runtime, if the record source for a grid needs to be requeryed or the record source name is changed the grid will do crazy things such as redefine column widths and header captions. But running the grid from this table can instantly put the grid back to the way it was.
If I need to add code to objects that are within the grid I class them ahead of time and then use the AddObject method in the table.
This works really good,... if you want I can send it to you.

Thanks again for your help!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform