Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ON KEY with grid control
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00158556
Message ID:
00159241
Views:
16
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform