Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Determine # of characters input in a field
Message
De
02/03/2003 23:28:08
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00759242
Message ID:
00760226
Vues:
18
>Is it possible (without using keypress) to determine the # of characters (including trailing blanks) in a field?
>For example, I have a field in an form (no control source) that has an input mask of =replicate('X',30). If 'abc' or 'abc ' is input, the length of this.value is 30. If I check the length of the alltrim, it is 3, of course.
>Or to present the question another way ... How would I determine * exactly * what the user entered?
>TIA.

After having read pretty much everything in the thread so far... why do you have this input mask? Want to have no more than 30 characters?

You can do that in InteractiveChange, by simply checking the length of this.value, and chop if longer, then pass focus to next object. And with no .InputMask, you can set this.value=allt(this.value) in .gotfocus, so the length of this.value will be the length you want. No dirty tricks.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform