Winforms – How to fix the height and width of a winforms label to accept variable length text

controlslabeltextboxwinforms

I have created a wizard form and each page of the form will display some help text.

I either need a

1.Label control where I can fix the height and width of the label so it doesn't grow to long but rather wraps the text inside my fixed width and height.

But a label doesn't have sizing handles and seems to automatically adjust to the content.

OR

2.A textbox control (where I can already set the height and width if I set multiline off) however the user should NOT be able to edit the textbox…in fact the textbox should not be able to recieve the focus at all. (like a label)

Can someone tell me how to do one or the other.

Seth B Spearman

Best Answer

For Label, You should set label's Autosize property to false

For Textbox, set Enabled Property to false