If you create a panel on a form and set it to Dock=Top and drop another panel and set its Dock=Fill, it may fill the entire form, ignoring the first panel. Changing the tab
I've had the same problem and I managed to solve it.
If you have a container with DockStyle.Fill the others should also have DockStyle but Top or whatever you want.
The important thing is to add the control with DockStyle.Fill first in Controls then the others.
Example:
ComboBox cb = new ComboBox();
cb.Dock = DockStyle.Top;
GridView gv = new GridView();
gv.Dock = DockStyle.Fill;
Controls.Add(gv); // this is okay
Controls.Add(cb);
but if we put cb first
Controls.Add(cb);
Controls.Add(gv); // gv will overlap the combo box.