Hi all,
I'm having a problem adding controls to a panel dynamically. I have a
usercontrol that I create and try to add 5 times to the panel, but I only
ever see the first control. I know it's the first, because a property of
the userControl is to display it's name. The code I have is:
//Add detatil widgets to the panel
CustControls.DetailWidget x;
for (int i = 0; i<5; i++)
{
x = new CustControls.DetailWidget();
x.Name = "asdf" + i.ToString();
x.Location = new Point(i * 10, i * 10);
this.pnlDetailContainer.Controls.Add(x);
}
How is this supposed to work? Should the panel automatically place each
control under one another or next to one another or must that be done
entirely by hand?
Thanks!
-D