---------------------
A
---------------------
C
---------------------
B
----------------------
The question is, now I want to add D controls and how to do in the middle of A C? Try a lot of ways will not work, usually overwrite C control, the control is added last.
Find the Internet, many people have no choice but to propose a solution, that is to start over, to add controls to the window again in form, although you can solve the problems caused by Dock layout, but at the same time bring the doubled workload difficult to adjust to exactly the same with the previous layout.
Presumably this is not the solution, add add, I always wanted to add the controls to have the right to prioritize the Dock, should be able to proceed from the Designer file ah.
Locate the following code:
this.Controls.Add(this.C);
this.Controls.Add(this.B);
this.Controls.Add(this.A);
The code sequence is adjusted to:
this.Controls.Add(this.D);
this.Controls.Add(this.B);
this.Controls.Add(this.A);
That solved the problem.
Thus, in Desinger file is later added to the high priority control Dock sorted, i.e. the highest priority A sort control (following control high priority).