Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Home in text box
Message
De
14/10/2002 11:35:40
 
 
À
14/10/2002 11:31:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00710935
Message ID:
00710937
Vues:
15
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform