If you're referring to the cursor that shows you which cell is active in the grid, check out the "SelectedForeColor" and "SelectedBackColor" of the individual controls in each column. By default, they are text boxes. So, to make a "red cursor" in the first column, set:
MyGird.InitEvent
DODEFAULT()
WITH THIS
.SetAll("DynamicBackColor", ;
"IIF(recno(This.RecordSource)=THIS.inRecno, ;
RGB(0,255,0),RGB(255,255,192))","COLUMN"
ENDWITH
**EOF
====================================================
MyGrid.WhenEvent
This.inRecNo = RECNO()
RETURN .T.
====================================================
When the above codes are used in the said events of the grid control, the selected row will get the highlight.
This idea will help you to manipulate the colours ina similar way, as you want it.
Create a form level variable inRecNo and make the initial value to 0 (Zero). In my previous posting, I forgot to mention this.
====================================================
MyGird.InitEvent
DODEFAULT()
WITH THIS
.SetAll("DynamicBackColor", ;
"IIF(recno(This.RecordSource)=THIS.inRecno, ;
RGB(0,255,0),RGB(255,255,192))","COLUMN"
ENDWITH
**EOF
====================================================
MyGrid.WhenEvent
This.inRecNo = RECNO()
RETURN .T.
====================================================
When the above codes are used in the said events of the grid control, the selected row will get the highlight.
This idea will help you to manipulate the colours ina similar way, as you want it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.