Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabling a Key Press
Message
From
14/12/1999 11:24:02
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvania, United States
 
 
To
14/12/1999 11:15:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00303395
Message ID:
00303402
Views:
19
re: disable the "-" key

On key label - Do Nothing

Procedure Nothing
Return && Nothing

If you had the job-number (no "-") and a last name (with hyphenated last name) on the same form. You couldn't turn the "-" on for one field and off for another this way.

Wouldn't it be better to trim the "-" out of the data during the LostFocus event?

LostFocus:
this.value = allt(strtr(this.value,"-",""))

Then the user who is watching what they type isn't confused when they press a dead key, but you still pass 'clean' data to your application.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform