Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A formula for textbox width?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00020939
Message ID:
00020941
Views:
39
>Is there a formula to dertmine how wide a textbox should be, given font size and maximum characters allowed? For example, I have a textbox that is allowed no more than 5 characters. The textbox uses a times roman 12 point font. How wide should it be to fit the 5 characters without chopping off the last one or having extra space?
>
>
>Michael G. Emmons

Look into FontMetrics parameter 6. I then added 20% to that value and rounded up. It seemed to work for me. This is assuming a field does not consume all "W"'s which are wider that "I"'s in a non-fixed space world.
Steve Medvid
Systems Analyst

Environmental Resource Management
Previous
Reply
Map
View

Click here to load this message in the networking platform