Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to check the length of a text string
Message
From
25/11/1998 16:18:58
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00160649
Message ID:
00161595
Views:
23
>I seem to be having a problem calculating the length of a text string. I tried the txtwidth() function and and fontmetric() function as shown in the txtwidth() help examle and I am getting nowhere. All I want to do is find the lenght of a string so I can auto size the box or command button it appears in.
>
>As usual, many thanks to all who help.
>
>John J. Henn.

You may download alert.zip from files section - I've done some tricks there for sizing labels based on the length of the text and font used, but you may use that for any other control (beware of the margins, though). There's the full source of it, so you can use it any way you like.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform