C# – Wrapping Text on Label and Vertical scrollbar on panel

cwinforms

I have a label inside a panel. When the text exceeds, the label text should wrap. For doing that I have set mylabel's AutoSize = false and MaximumSize = 100,0.

Now since the text is being wrapped, vertical scrollbar should appear on panel. But that's not happening, please specify what I am missing here.
Is it possible this way or should I explicitly add a vertical scrollbar inside the panel?

Best Answer

1) You need to put the label inside the panel

2) AutoSize for label should be TRUE

3) AutoSize for panel should be FALSE

4) AutoScroll for panel should be True

that is it!

enter image description here

Related Topic