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?
true if the control adjusts its width to closely fit its contents; otherwise, false . When added to a form using the designer, the default value is true .
Just use the AutoSize
property, set it back to True
.
Set the MaximumSize
property to, say, (60, 0)
so it can't grow horizontally, only vertically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With