How do I set a TextBox width acorrding to a string?

U

Udi

Hi,
I have a simple multiline TextBox which I need to set its width
according to the longest line in Lines.
I assume I need to calculate the font width, how do I do that?
Thanks!
 
S

Stoitcho Goutsev \(100\)

Just a quick note.
..NET 2.0 has TextRenderer class that provides more accurate measuring of a
text.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top