A control has two methods to achieve what you are looking for: SendToFront
and SendToBack
.
Gerrie Schenck
2010-04-09 12:58:20
A control has two methods to achieve what you are looking for: SendToFront
and SendToBack
.
Go to View -> Other windows -> document outline.
In that window drag the controls so the docking is as you like it to be.
The order in which the controls are being added to the Controls collection determines the docking order.
Best Regards,
Oliver Hanappi
As you said, the newest control to be add to the controls collection is the one on top. If you need newer control to be add at the bottom, I'll suggest to create a list of control, add the controls to the list, reverse the list and add the list to the controls collection.
List<Control> controls = new List<Control();
controls.Add(new myFirstControl());
controls.Add(new mySecondControl());
controls.Reverse();
this.Controls.AddRange(controls.ToArray());