Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Imput masks
Message
De
17/06/1999 13:02:42
 
 
À
17/06/1999 09:44:29
Richard Williams
State of Ohio, Dept. of Development
Columbus, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00230664
Message ID:
00230958
Vues:
29
>Hi Erik,
>Only Edit boxes have a maxlenght property. I am using a textbox which -at least in vfp3.0- does not have a maxlenght property. Any other ideas??
>Thanks Again Rick

Woops. I assumed that VFP 3 text boxes had the property too (they do in VFP 5 and later).

I don't have VFP 3, so I can't test, but you can try something like the following in the KeyPress event:
IF TYPE("THIS.Value") = "C"
	IF LEN(THIS.Value) >= LEN(THIS.InputMask)
		NODEFAULT
	ENDIF
ELSE
	IF LEN(ALLTRIM(STR(THIS.Value))) >= LEN(THIS.InputMask)
		NODEFAULT
	ENDIF
ENDIF
this will discard the keypress anytime the length of the value is already at the length of the input mask. I know, this should be automatic, but ....
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform