How do I reorder tabs in visual basic? When I hide then show a tab it appears last rather than first.
Code:
Dim tab As TabPage
Dim checktab As Integer = 0
Private Sub HideTabPage(tabPage As TabPage)
tab = tabPage
Me.SearchExtras.TabPages.Remove(tabPage)
checktab = 1
End Sub
Private Sub UnHideTabPage()
If checktab = 1 Then
Me.SearchExtras.TabPages.Add(tab)
checktab = 0
End If
End Sub
Reply Quote
You can use TabPageCollection.Insert instead of Add, and specify the index at which you want the tab to be inserted, so in your case it can look like this: