C
Curt Cullens
I have created a groupBox with Multiple dynamic panels inside of it.
The all ahve the same dimensions, and are set visible=false
The groupBox is anchored on Top, Left, Bottom, Right
All the panels are set to
Dock = dockstyle.fill;
AutoScroll = true;
I am not able to see any vscrollbar at all, but the hscrollbar appears
to be working.
here is the code to create the panels :
(They are being created dynamically from a database)
while (dbReader.Read())
{
tmpPG_Cnt = tmpPG_Cnt + 1;
testID = dbReader["ID"].ToString();
testName = dbReader["SystemType"].ToString();
Panel pTest = new Panel();
groupBoxTest.Controls.Add(pTest);
pTest.Dock = DockStyle.Fill;
pTest.AutoScroll = true;
pTest.Name = "pTest" + testID;
pTest.Visible = false;
pTest.SendToBack();
}
here is the code to make the panel appear :
// Find the Correct tPanel (Test Panel) to manipulate
foreach (Control c in groupBoxTest.Controls)
{
if (c is Panel)
{
if (c.Name.ToString() == pName)
{
c.Visible = true;
c.BringToFront();
}
}
}
groupBoxTest.Text = testName;
groupBoxTest.Visible = true;
any help would be greatly appreciated
cheers
~curt
The all ahve the same dimensions, and are set visible=false
The groupBox is anchored on Top, Left, Bottom, Right
All the panels are set to
Dock = dockstyle.fill;
AutoScroll = true;
I am not able to see any vscrollbar at all, but the hscrollbar appears
to be working.
here is the code to create the panels :
(They are being created dynamically from a database)
while (dbReader.Read())
{
tmpPG_Cnt = tmpPG_Cnt + 1;
testID = dbReader["ID"].ToString();
testName = dbReader["SystemType"].ToString();
Panel pTest = new Panel();
groupBoxTest.Controls.Add(pTest);
pTest.Dock = DockStyle.Fill;
pTest.AutoScroll = true;
pTest.Name = "pTest" + testID;
pTest.Visible = false;
pTest.SendToBack();
}
here is the code to make the panel appear :
// Find the Correct tPanel (Test Panel) to manipulate
foreach (Control c in groupBoxTest.Controls)
{
if (c is Panel)
{
if (c.Name.ToString() == pName)
{
c.Visible = true;
c.BringToFront();
}
}
}
groupBoxTest.Text = testName;
groupBoxTest.Visible = true;
any help would be greatly appreciated
cheers
~curt