I’ve got two panels (panel1 and panel2) inside a main panel. Panel1 is set to DockStyle.Top and panel2 is set to DockStyle.Fill. I would assume that panel2 would fill the remaining space left after panel1 but instead it just fills the whole of the main panel and panel1 sits over panel2.
How do I get panel2 to just fill the remaining space after panel1 is set to DockStyle.Top without them overlapping?
For the Panel2 use anchors in all ways.