2
I am inserting in a Panel several Labels, as I am inserting, the first Label becomes last in Panel. But I wanted to reverse this process. I wanted the first Label that was inserted to be in the first place in the Panel, and not in the last.
private void Form1_Load(object sender, EventArgs e)
{
Label lbl;
Panel pn = new Panel();
pn.AutoScroll = true;
pn.Dock = DockStyle.Fill;
for (int i = 0; i < 13; i++)
{
lbl = new Label();
lbl.Dock = DockStyle.Top;
lbl.Text = i.ToString();
pn.Controls.Add(lbl);
}
this.Controls.Add(pn);
}