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.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement