Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to stop when the field length is reached
Message
De
08/07/2002 12:52:48
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00676137
Message ID:
00676206
Vues:
16
This message has been marked as the solution to the initial question of the thread.
< snip >
>If doesn't seem to work. For instance, I have a textbox with controlsource BldMstr.Page (it's an integer field). I set MaxLength to 2 (for testing sake), but it still allows me to type 7 digits.
>
>I tried the following code in textbox InteractiveChange:
>
>if len(alltrim(this.text))>this.MaxLength
>   nodefault
>endif
>
>But it doesn't work either.
>
>What else can I do? May be set confirm ON in interactive change? (Back to off in GotFocus)?

From VFP help:
MaxLength only applies for a text box when MaxLength is greater than 0, the text box does not use the InputMask property, and its Value property is of character type.

Checking on Keypress event? InputMask?
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform