Hello,
I want to create severalbuttons within another panel. These createdbuttons are used for a tuchscreen app.
Each Button reveices a DockStyle TOP. The problem is that the second created button comes above th first, and the thrid above the second. As the buttons are dynamically generated from a query i just can reverse my ordering and it works.
But i want to know if it is possible to create a button and dock it below an existing button, both with style top.
This is my code.
foreach (DataRow row in myDataTable.Rows)
{
SimpleButton sb = new SimpleButton();
sb.Text = row["PRDTYPE_NAME"].ToString();
sb.Height = ButtonHeight;
sb.Dock = DockStyle.Top;
sb.Parent = pcLeft;
sb.Image = imgFolder;
sb.Tag = Convert.ToInt32(row["PRDTYPE_UI"].ToString());
sb.Click += SelectBrandLevel;
}