Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ESC key with combobox in grid??
Message
 
To
30/12/2000 22:23:41
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00458167
Message ID:
00458352
Views:
14
Mark,
Grids are strange - the activecontrol is the grid, not the textbox or combobox inside as you might think. You might try adding the code that resets the KeyPreview property to the AfterRowColumnChange event as well - if the cursor is in the column that has a combobox set KeyPreview to .F., otherwise to .T.

Also, I removed the angle brackets in your previous message and set the PRE tags around it. HTML sees the angle brackets as an attempt to display an HTML tag and ignores anything that ISN'T a tag, so your text disappeared.

HTH
Barbara

>I close my form when user hits "esc" key. but because of that i have following problem.
>i.e. use clicks on combobox , which will populate drop down list . and then if user hits "esc" it closes the whole form. but instead it should close the dropdown and return focus to combobox. (which is combobox's default behaviour also)
>
>For your knowledge , I have kept the form's Keypreview property .T. I also have property called "lreleaseonEsc" . I have following code in form's keypress event.
>
>If Thisform.lReleaseOnEsc and nKeyCode = 27
>thisform.releaseform() &&check for unsaved data before closing form
>endif
>
>someone recently suggested me put following code in combobx to solve this problem.
>In the ComboBox's GotFocus event set the form's KeyPreview property to .F. and set it back to .T. in the ComboBox's LostFocus event.
>this works fine only if combobox is not inside grid. if combobox is inside the grid this still behaves same.anyone have idea. please help. thanks in adavnce.
>
>
>
>Mark
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform