General information
Category:
Forms & Form designer
Of course we're all hoping for a more mature grid in VFP 8. Meanwhile, the MicroEndeavors method works well:
Add a numeric property to the form, initialized to 0.
In the Init of the grid, SetAll DynamicBackColor of the columns of the grid based on whether the form property equals the RECNO() of whatever RecordSource the grid is displaying.
ThisForm.rnMyRecordNumber=RECNO('cMyTable')
This.SetAll( "DynamicBackColor", ;
"IIF( ThisForm.rnMyRecordNumber=RECNO('cMyTable'), ;
RGB(0, 255, 255), ;
RGB(255, 255, 255) )", "Column" )
In the When of each Control in each Column, set the property to the RECNO().
ThisForm.rnMyRecordNumber=RECNO('cMyTable')
This has the desirable effect of preserving the row highlight when the grid or even the form loses focus.
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