Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Home in text box
Message
From
14/10/2002 11:35:40
 
 
To
14/10/2002 11:31:14
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00710935
Message ID:
00710937
Views:
13
Joel,

You can trap these keys in the keypress method of the textbox. The following code prevents left-arrow from exiting, you can add similar code for the other keys. Put this in your custom textbox class, and you only have to mess with it one time...
LPARAMETERS nKeyCode, nShiftAltCtrl

&& backspace or left arrow will not exit textbox
if (this.selStart = 0 and this.selLength = 0)
	if nKeyCode = 127 or nKeyCode = 19 or (nKeyCode = 52 and nShiftAltCtrl = 1)
		noDefault
	endif
endif
>If you press HOME twice in a textbox, or HOME then left arrow, the focus moves to the previous control. Likewise, if you press END twice or END then right arrow, the focus moves to the next control. I can find no easy way of stopping this. Can anyone help?
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform