General information
Title:
How to determine TextBox width?
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only