Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Set Focus ??
Message
From
19/09/2002 22:03:15
 
 
To
19/09/2002 08:06:54
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00702192
Message ID:
00702581
Views:
9
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
Map
View

Click here to load this message in the networking platform