I have a Panel
that I'm creating programmatically; additionally I'm adding several components to it.
One of these components is a Label
which will contain user-generated content.
I don't know how tall the label should be, but it does have a fixed width.
How can I set the height so that it displays all the text, without changing the width?
Best Answer
Just use the
AutoSize
property, set it back toTrue
.Set the
MaximumSize
property to, say,(60, 0)
so it can't grow horizontally, only vertically.