Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ON KEY with grid control
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00158556
Message ID:
00159241
Vues:
17
Your best bet is to probably put the key handling for this in the Keypress event of the form. To have the form's Keypress event fire for contained controls, you'll need to set the KeyPreview property to .T.

In the Keypress event, you can check to see if the grid has focus with the following:

IF THIS.ActiveControl.BaseClass = "Grid"
* put checks for INS & DEL keys here
ENDIF

If you want to check for a specific grid on your form, you can use the Name property instead of the BaseClass property.


>I'm pretty sure this was discussed prior (like a lot of things) but I can't remember what the best solution was :(
>I want to use ON KEY LABEL command to Ins/Del records with in a grid control. I can get the grid to do this but what is the best place to put the code to disable this when grid looses focus?
>
>TIA
>John.
Ryan Katri
COB System Designs, Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform