Results 1 to 2 of 2

Thread: Change tab via Link

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2003
    Posts
    124

    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

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jun 2003
    Posts
    124
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width