I have this for loop:
int iPanelNumber = 1;
foreach (string[] Persons in alItems)
{
Panel pPanelContainer = new Panel();
pPanelContainer.Width = contentPanel.Width;
pPanelContainer.Height = 50;
pPanelContainer.BackColor = Color.FromArgb(
Convert.ToInt32(aWhiteContentBackgroundColors[0]),
Convert.ToInt32(aWhiteContentBackgroundColors[1]),
Convert.ToInt32(aWhiteContentBackgroundColors[2]));
pPanelContainer.Name = "PanelContainer" + iPanelNumber.ToString();
pPanelContainer.Visible = false;
pPanelContainer.Location = new Point(0, 0);
}
So as you can see, i have given the panels i create the name "PanelContainer1", "PanelContainer2" etc...
But how can i reach these panels?
I certainly could not reach them by writing:
PanelContainer1.visible = true;
Anyone got an idea?
Thanks in advance