Search code examples
vb.netwinformsflowlayoutpanel

FlowLayoutPanel does not wrap content


I have a SplitContainer with Panel1 in the left side and FlowLayoutPanel1 inside it. Likewise, there's a Pnael2 and FlowLayoutPanel2 in the right side of the SplitContainer.

The settings are identical: Settings of Panels and FlowLayoutPanels

This settings always works for me, but in this case, it works only in the left side. The FlowLayoutPanel2 does not wrap it's contents (groupboxes containg another form with small graph), which flows to the right beyond the form and screen.

Any ideas, why this should happen?

Regards,

Oak


Solution

  • OK, I finally found the reason of this problem: It was caused by the objects, which were inserted. When inserting the module, I accidentally left there this line of code:

    NewLineChart.Dock = DockStyle.Fill
    

    This is applied for inserting form into the module (GroupBox object), but should not be applied to the module itself...

    Regards,

    Oak