Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Determine # of characters input in a field
Message
 
À
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:
00760296
Vues:
12
Dragan,

The focus of the post was really to be able to determine the length of the user input for a character field including leading and trailing spaces.
I was checking thru the properties and built-in VFP 7 functions and could not find one.

>>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.
Regards,

Allan Coganovitch
allanc@proven-solutions.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform