Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disabling a Key Press
Message
De
14/12/1999 11:24:02
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvanie, États-Unis
 
 
À
14/12/1999 11:15:05
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00303395
Message ID:
00303402
Vues:
18
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform