Adding a Design time Panel to a TabPage at run time
Posted
by BDotA
on Stack Overflow
See other posts from Stack Overflow
or by BDotA
Published on 2010-06-01T13:53:30Z
Indexed on
2010/06/01
14:33 UTC
Read the original article
Hit count: 172
Hi,
I wish to have a Panel with the controls on it at design time but I want to add this panel to a desired tabPage of my TabControl at run time.
I wrote something like this, did not work : the panel does not show up in the tab page. please help me.
panel2.Parent = tabGuy.TabPages[0];
tabGuy.SuspendLayout();
tabGuy.TabPages[0].Controls.Add(panel2);
tabGuy.ResumeLayout();
panel2.Show();
© Stack Overflow or respective owner