Archive

Archive for October, 2009

Windows form Label Control Autosize and wrap text vertically

27 October, 2009 Leave a comment

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.

Cheers

 

Advertisements
Categories: Windows Forms