Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Limiting the number of lines in a memo box
Message
From
06/09/2001 11:41:05
 
 
To
06/09/2001 11:35:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00553178
Message ID:
00553184
Views:
15
>Hello,
>How do I limit the number of characters or lines in a memo box? I haven't been very successful...


Something like the following should work: In the KeyPress() check
IF LEN( TRIM( this.value ) ) > MyLimit
  NODEFAULT
ENDIF
You'll want to do some more advanced stuff like checking for whether the keypress is navigation key, or backspace, or delete, for example.

*sheesh. Or you could go the easy route and use Sergey's suggestion. doh!* :)
Previous
Reply
Map
View

Click here to load this message in the networking platform