Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Format property to limit input in textbox
Message
De
19/04/2016 01:29:46
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
18/04/2016 17:11:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01634940
Message ID:
01634950
Vues:
113
>Is it possible to, using the format property to limit the input into a textbox? For instance Only three letters - a Y for Yes, an N for No, and an M for Maybe - and have it not lose focus if one of those are not entered. I know how to do it in the Valid method, but was wondering if there was some magic to use in the Format property, or something
>
>Thanks.

off topic (a little bit)

There is a widly unknown problem with input (on any element). This is [CTRL]+0 (zero). Whatever you do with FORMAT, this is a valid entry, - NULL-. So this sets the value of the object to NULL if your controlsource can not deal with it you have a nice little error

do not forget to add to base classes KeyPress event something like
LPARAMETERS;
 tnKeyCode,;
 tnShiftAltCtrl

IF  tnShiftAltCtrl=2 AND tnKeyCode=48 THEN
  NODEFAULT
ENDIF
Lutz

Update:

M for Maybe is NULL, because NULL is in boolean the I don't know. This is the way all subsequent boolean logic works.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform