but how do I calculate the value of x? All I have is the Length of my
string, the lenght for instance of the string "Pumping Station" is 15, but if
I were to set the Width of my text box to 15, then this would not be the
correct width, as the width is in pixels I think. I guess the question is,
how do you calculate the width of length ;-)
"Jeff Connelly" wrote:
"Steve" <St***@discussions.microsoft.com> wrote in message
news:C5**********************************@microsof t.com...
Visual Studio 2003 .NET C#
I am trying to change the width of a textbox at run time, to fit in the
text
it contains. How can I do this?
System.Windows.Forms.TextBox myTextBox = new System.Windows.Forms.TextBox();
myTextBox.Width = x;