SSTab - which tab is selected? *RESOLVED*-VBForums
Results 1 to 8 of 8

Thread: SSTab - which tab is selected? *RESOLVED*

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Posts
    414

    Resolved SSTab - which tab is selected? *RESOLVED*

    I know how to get the tab index using the SSTab1_Click function but can't use that here so I need to know which tab the user selected using a command button. In other words something like this (this example doesn't work of course) It has 10 tabs on it. Thanks

    Private Sub Command1_Click()
    MsgBox SSTab1.TabIndex 'which tab is selected
    End Sub
    Last edited by jdc6029; Sep 23rd, 2004 at 04:28 PM.

  2. #2
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654
    I saw this posted at PSC: http://www.planetsourcecode.com/vb/s...56301&lngWId=1

    It shows how to dynamically add stuff to SSTab, but it also shows you how to find out the selected tab

    (well, atleast seems so)

  3. #3
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,135
    Just read Tab property:
    VB Code:
    1. Private Sub Command1_Click()
    2.     MsgBox "Current Tab is " & SSTab1.Tab
    3. End Sub

  4. #4
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    I know how to get the tab index using the SSTab1_Click
    Are you sure? It would be the exact same code that you would put in the Command_Click event.

    TabIndex has nothing to do with which tab is current. Almost all controls have a TabIndex property. VB uses the TabIndex when navigating through the form using the Tab key.

  5. #5
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,135
    I think he meant Index for currently selected Tab which is Tab property for SSTab control.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Posts
    414
    Thanks RhinoBull. I was going about it the hard way.

    I think he meant Index for currently selected Tab which is Tab property for SSTab control
    Yes that's what I meant

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Posts
    414
    Forgot to say thanks to Merri for the tip about the PSC project. Interesting

  8. #8
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,135
    ... and don't forget to add "RESOLVED" to your original post's title.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.