Hi Tamir,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need adjust the size of the TextBox
according to the string in it. If there is any misunderstanding, please
feel free to let me know.
We can use Graphics.MeasureString method to get the size for a particular
string and font. And then change the size of the TextBox. Here, I have
written some sample code for you. HTH.
Graphics g = this.textBox1.CreateGraphics();
SizeF s = g.MeasureString(this.textBox1.Text, this.textBox1.Font);
this.textBox1.Width = Convert.ToInt32(s.Width);
this.textBox1.Height = Convert.ToInt32(s.Height);
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."