I am writing a UserControl which adds child controls programmatically. Currently I am adding new controls like so:
this.Controls.Add(new Control() { Height = 16, Dock = DockStyle.Top });
The problem I am experiencing is that new controls are added above the existing controls, so where I want the controls to be ordered 1, 2, 3, 4, 5, 6 from top to bottom, it's ordering them as 6, 5, 4, 3, 2, 1 from top to bottom.
I want to know how I ensure a new control is added after all existing controls (in terms of display order).
And also, I want to know if I can insert a control between two other selected controls
I have tried setting the TabIndex but that didn't help!