Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
KeyPress ignores NODEFAULT
Message
From
20/06/2001 17:57:49
 
 
To
20/06/2001 17:53:37
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00521694
Message ID:
00521703
Views:
15
Charlie,
No, there's no DODEFAULT() in this method. As I mentioned, the problem only occurs if the textbox is in a grid.
Thanks for replying.

>Hi Daniel,
>Is there any DODEFAULT(m.nKeyCode, m.nShiftAltCtrl) in the --etc.? If so you should only DODEFAULT() when you want the default VFP behavior AND the baseclass code too.
>>Hi,
>>I found a strange problem with a textbox class that I'm using in a grid. Here's some code from the KeyPress event:
>>
>>*-- textbox.KeyPress
>>LPARAMETERS nKeyCode, nShiftAltCtrl
>>
>>
>>DO CASE
>>	 CASE nKeyCode = -1  && F2 = Edit mode
>>	 	This.ilEditMode = .t.
>>	 CASE nKeyCode=27    && ESC
>>	 	IF This.ilEditMode
>>	 		*-- if we're in edit mode, reset mode and
>>	 		*-- suppress the ESC key
>>	 		*-- Note: this code doesn't work if the textbox is in grid!
>>			ThisForm.ilEditMode = .f.
>>			NODEFAULT
>>		ENDIF
>>	*-- etc...
>>ENDCASE
>>
>>The idea is to suppress the ESCAPE key if we're in edit mode. NODEFAULT doesn't prevent the form from being closed. The same textbox works perfectly if it's outside of the grid. Is this a known bug or am I missing something?
>>
>>Any ideas are appreciated.
Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform