Hi,
Is there any way to hide or disable a tab of the tab control. ? (.NET 2.0)
Thanks.
http://www.thescripts.com/forum/thread520467.html
You can remove it with the following line of codeTabControl.TabPages.Remove(TabPage)If you declare a form level variable you can also insert it back in at the correct index if you'll need it later.
Private tabOne As TabPagePrivate Sub Form_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load tabOne = TabPage1End SubPrivate Sub ButtonRemove_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonRemove.Click TabControl.TabPages.Remove(tabOne)End SubPrivate Sub ButtonInsert_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonInsert.Click TabControl.TabPages.Insert(0, tabOne)End Sub