C# WinForms How to add Panels with 100% width to FlowLayoutPanel?

1.3k Views Asked by At

I'm currently adding dynamically panels inside a flowlayoutpanel. The size of the panel is defined by the flowlayoutpanel width (flowlayoutpanel.clientsize.width). But as soon as I resize the GUI and the flowlayoutpanel gets bigger, the panel stays the same size. I tried to solve the problem with anchors but it didn't work out for me.

How can I keep the panel size same as the flowlayoutpanel size?

Picture of what I'm trying to achieve after resizing the window:

enter image description here

0

There are 0 best solutions below