How can I make a particular TabPage invisible inside a TabControl?
How can I make a particular TabPage invisible inside a TabControl?
Invisible is impossible, but it can have the same effect by removing and adding TabPage
to TabControl
:
tbControl.TabPages.Remove(tabPage);
tbControl.TabPages.Add(tabPage);
You can unlink TabPage
from TabControl
in question through Parent
property, without having to remove it:
suaTabPage.Parent = null;
And to bind, just indicate TabControl
:
suaTabPage.Parent = tbControl;