I am using the code below to hide and show tabs. The tab names are stored in a dictionary
The code I am currently using works great if you just need to append the shown tab to the end of the tabcontrol, but not when you need to show it in it's original location before hidden.
I tried using insert, but it does not restore the correct tabpage. Each tab pages controls are numbered according to the tabs index, so if a using wants to show a tab, they select the tab they want to display and I need to display that tab.
It works if I just add the tab, but if I insert the tab, I get a different tab.
Basically I need to append the tab to the 2nd to last position in the tabControl.
i.e. position = tabcontrol1.tabcount - 2
I hope this is clear.
Anyone have any ideas?
Tab 0 = controlname & 0
so the name would be controlname0
Tab 1 = controlname & 1
so the name would be controlname1
Dim tabs As New System.Collection.Generic.Dictionary(Of String, TabPage)
Private Sub RemoveTab(name As String)
Dim tab As TabPage = TabRacing.TabPages(name)
Private Sub RetrieveTab(name As String)
Dim tab As TabPage = tabs(name)