Each column in a grid has properties called DynamicBackcolor and DynamicForeColor.
To change the color of the active row, do the following:
1) Add a property to the grid called CurrentRecord
2) In the AfterRowColChange method of the grid, add the following code:
this.CurrentReocrd=recno()
this.Refresh
3) In each column's DynamicBackColor property, put the following:
"iif(recno()=this.parent.CurrentRecord,RGB(0,0,200),RGB(255,255,255) )"
4) In each column's DynamicForeColor property, put the following:
"iif(recno()=this.parent.CurrentRecord,RGB(255,255,255),RGB(0,0,0) )"
Note that the properties in DynamicBackColor and DynamicForeColor must me in quotes, or you'll get an error.
Previous
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