I have a form containing a TableLayout with 1 column and 3 rows, which contains 2 FlowLayoutPanels and a text box. All rows are AutoSize, and Percentage = 100% is set in the column.
Each FlowLayoutPanel contains several text fields. The flags of FlowLayoutPanels are set: LeftToRight, AutoSize = true, GrowAndShrink, Docking = Fill.
Circuit:
Form TableLayout (Dock=Fill) FlowLayoutPanel(Dock=Fill, AutoSize=True, GrowShrink) More controls FlowLayoutPanel(Dock=Fill, AutoSize=True, GrowShrink) More controls TextBox(Dock=Fill, MultiLine=true)
The problem is that I put the FlowLayoutPanel inside the GroupBox, which is also set to AutoSize = true, the height of the FlowLayoutPanel is set incorrectly, and it shows TextBoxes in 1 line, cutting some TextBoxes from the form.
Circuit:
Form TableLayout (Dock=Fill) GroupBox (Dock=Fill, AutoSize=True, GrowShrink) FlowLayoutPanel(Dock=Fill, AutoSize=True, GrowShrink) More controls GroupBox (Dock=Fill, AutoSize=True, GrowShrink) FlowLayoutPanel(Dock=Fill, AutoSize=True, GrowShrink) More controls TextBox(Dock=Fill, MultiLine=true)
By the way, the same thing happens if I use instead of GroupBox, Panel or even UserControl to store the FlowLayoutPanel.
By the way 2, this happens even without a TableLayout. I tried to place a GroupBox (with FlowLayoutPanel) in an AutoSize Form, and I get the same behavior.
I think the problem is that when the FlowLayoutPanel is in another container, which is also AutoSize, it cannot pass the container to it, the preferred size.
What can be done to undo this error?
Please help Thanks, Yoram
ps: I have to use GroupBox to have a nice frame around text fields.