Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Determine # of characters input in a field
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00759242
Message ID:
00759405
Views:
26
>Jim
>
>I wanted 'abc ' to return a length of 4 and 'abc' to return a length of 3.
>If they typed in a leading space, I also wanted that to be included in the lenth.
>

Allan,

I poked around a bit yesterday and as far as I can see you can get the length of the inputmask, or the length of the value without trailing spaces, but I could see any way to get the length to only include the trailing spaces that the user actually type. The only approach I can think of would be to build a textbox class that handled the issue for you. Probably a little code in the Keypress that updates a custom property used to count the charactyers typed by the user. That would give something like;
lnStringLen = Thisform.Text1.ValueLength
Where ValueLength is the custom property.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform