Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Set Focus ??
Message
De
19/09/2002 22:03:15
 
 
À
19/09/2002 08:06:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00702192
Message ID:
00702581
Vues:
10
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform