foreach(TabPage tp in myTabControl.TabPages)
{
myTabControl.TabPages.Remove(tp);
}
you have to be careful when removing them, because if you don not reference
them anywhere else, the garbage collector will collect them.
So the easiest way is to add your tab pages to a collection (ArrayList or
something else) and then whenever you need to show a particular tab page in
your tab control , you just add it to TabPages collection.
Fitim Skenderi
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.