Results 1 to 10 of 10

Thread: tabstrip

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    15
    how do you set up a tabstrip?

  2. #2
    Guest
    Why part are you having trouble on?

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    15
    i know this is going to sound dumb but i've never had a need for a tabstrip before,

    how do you set a seperate action/event/function for each tab?

  4. #4
    Guest
    Use the SelectedItem property to check the selected tab.
    Code:
    Private Sub TabStrip1_Click()
    
        Print TabStrip1.SelectedItem.Index
        
    End Sub

  5. #5
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Code:
    Private Sub SSTab1_Click(PreviousTab As Integer)
        
       Select Case PreviousTab
            Case 0
            MsgBox "tab0"
            Case 1
            MsgBox "tab1"
            Case 2
            MsgBox "tab2"
       End Select
       
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  6. #6

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    15
    interesting, I get the tab number printing on the side of the form.

    Thanks for your reply,

    how do I put another control (a text box) to say tab 2?

  7. #7
    Guest
    Code:
    Private Sub TabStrip1_Click()
    
        If TabStrip1.SelectedItem.Index = 1 Then
            Text1.Visible = True
        Else
            Text1.Visible = False
        End If
        
    End Sub

  8. #8

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    15
    this
    Private Sub SSTab1_Click(PreviousTab As Integer)
    Select Case PreviousTab
    Case 0
    MsgBox "tab0"
    Case 1
    MsgBox "tab1"
    Case 2
    MsgBox "tab2"
    End Select
    gave me an error saying

    procedure declaration does not match description of event or procdure having the same name

    thanks for your post

  9. #9

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    15
    Thanks Megatron

    If TabStrip1.SelectedItem.Index = 1 Then
    Text1.Visible = True
    Else
    Text1.Visible = False
    End If

    this is exactly what i was looking for

  10. #10
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    That's cause I used SSTabControl and not the Windows Tab Control...
    Sorry...
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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