-
Change tab via Link
Heres what im having trouble with
In the current tab (tbServers) of TabControl1 i have a LinkLabel going to tbCabinets, aslo in TabControl1.
When I click the link i want the tbCabinets tab displayed, but everything i've tried hasnt worked.
tbServers is the first tab
tbCabinets is the second tab
I'm guessing the TabPages index is 0-based so their indexes are 0 and 1 respectively.
thanks duders
db
-
I figured it out, heres the code if anyone cares...
The link code
Private Sub lnkCabFromServer_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles lnkCabFromServer.LinkClicked
changeTab(tbCabinets.TabIndex)
End Sub
the changeTab code
Private Sub changeTab(ByVal Destination As Integer)
TabControl1.SelectedTab = TabControl1.TabPages(Destination)
End Sub