Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Imput masks
Message
From
17/06/1999 13:02:42
 
 
To
17/06/1999 09:44:29
Richard Williams
State of Ohio, Dept. of Development
Columbus, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Miscellaneous
Thread ID:
00230664
Message ID:
00230958
Views:
28
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform