C# – Flowlayout panel not display the scroll bar after some resizes

cnetuser interfacevb.net

I have a flowlayout panel and on a resize event, I resize all the controls inside the flowlayout panel so they fit the width of the (flowlayoutpanel – padding – scroll bar width). On some resizes, the scroll bar is not shown, hiding most of the controls outside the area of the flowlayoutpanel while on other resizes the scroll bar is shown.I have set the AutoScroll property on the flowlayoutpanel to true. This is all done using C#, but I have also encountered this problem in VB.net.

Is there a way to force the flowlayoutpanel to recalculate how the controls are laid out after I resize the controls in the resize event or some other way to fix this problem?

Best Answer

Try the .PerformLayout() method, see if that helps.

Related Topic