madmare
asked on
Remove Panels
hi all,
i wrote a code that in each time the user press on Button my program add a Panel on a PictureBox, how do i Remove all the Panels that the user add
Panel p1 = new Panel();
p1.Top = left_dise_click_Y(e.Y);
p1.Left = left_dise_click_X(e.X)+1;
p1.Width = Convert.ToInt16(textBox3.T ext)*Dises X-1;
p1.Height =Convert.ToInt16(textBox4. Text)*Dise sY-1;
p1.BackColor = Color.Yellow;
pictureBox2.Controls.Add(p 1);
i wrote a code that in each time the user press on Button my program add a Panel on a PictureBox, how do i Remove all the Panels that the user add
Panel p1 = new Panel();
p1.Top = left_dise_click_Y(e.Y);
p1.Left = left_dise_click_X(e.X)+1;
p1.Width = Convert.ToInt16(textBox3.T
p1.Height =Convert.ToInt16(textBox4.
p1.BackColor = Color.Yellow;
pictureBox2.Controls.Add(p
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thnx mnasman
glad to help :-)
you could use Tag property to add value for the panels at runtime, and test if the value exist to remove the panel