Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine TextBox width?
Message
From
21/09/2009 00:57:21
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
How to determine TextBox width?
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01425392
Message ID:
01425392
Views:
144
Hi,

I have a TextBox control which is bound to a C32 field.

How do I programatically find out the shortest width of the TextBox and make sure any 32 characters inputed will be displayed fully in the textbox?

I was thinking:
TextBox.Width = 32 * FONTMETRIC(7, TextBox.FontName, TextBox.FontSize)

But FONTMETRIC(7) is crazy... for Arial font size 10, it gives me 35 about 6 time of FONTMETRIC(6)...
Next
Reply
Map
View

Click here to load this message in the networking platform