Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MaxLength TextBox Property
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00084737
Message ID:
00084905
Views:
34
>>>This.MaxLength = ;
>>> iif(!empty[This.ControlSource], fsize[This.ControlSource], 0)
>>>Anyone have any luck with this?
>That is what I am doing, but when I try it, the length seems to be font-specific (I am using Aerial). For example, for a 40 character field, it does not terminate until about character 46.

Mark,

Well I would tend to use LEN() instead of fsize() becasue fsize is for fields only and the controlsource might be a non-field. I also would use an InputMask of REPLICATE("X",LEN(THIS.Controlsource))instead of the Maxlength, only becasue that is how I've done it before and it works.
Previous
Reply
Map
View

Click here to load this message in the networking platform