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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only