Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamically Size A Text Box
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00481579
Message ID:
00481590
Views:
10
>Fred,
>
>When I issue:
>
>? TXTWIDTH("Client", "Arial", 9)
>
>in the Command Window, it returned 6.400.
>
>This is obviously not the correct Width setting for the textbox. Am
>I missing somehting?
>
>Thanks

My bad. TXTWIDTH() will return the number of characters using the average size in pixels of the font. You could then use FONTMETRIC() element 6, I believe as a multiplier to get the length. Sorry about that.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform