how do you set up a tabstrip?
Printable View
how do you set up a tabstrip?
Why part are you having trouble on?
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?
Use the SelectedItem property to check the selected tab.
Code:Private Sub TabStrip1_Click()
Print TabStrip1.SelectedItem.Index
End Sub
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
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?
Code:Private Sub TabStrip1_Click()
If TabStrip1.SelectedItem.Index = 1 Then
Text1.Visible = True
Else
Text1.Visible = False
End If
End Sub
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
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
That's cause I used SSTabControl and not the Windows Tab Control...
Sorry...