Archive for October, 2009

Windows form Label Control Autosize and wrap text vertically

October 27th, 2009 No comments

The other day I was trying to get a label control to autosize vertically and struggled to do it… but there is a simple trick…

Set the maximum width.

If you say “AutoSize=true” but set no MaximumSize.Width property it will just disappear off the right hand side of you form.

Set the MaximumSize.Width and the control autosizes correctly and wraps the text in the label control.



VN:F [1.9.22_1171]
Rating: 10.0/10 (2 votes cast)

Categories: Windows Forms Tags: