|
-
Feb 4th, 2003, 05:30 AM
#1
Thread Starter
Member
TabStrip Question
Can anyone tell me how I set one tab on the tab strip to be pressed down when a form loads?
-
Feb 4th, 2003, 06:34 AM
#2
Addicted Member
sstab1.tab = 0 or
sstab1.tab = 1 or
sstab1.tab = 2 or
-
Feb 4th, 2003, 07:31 AM
#3
Thread Starter
Member
Originally posted by Mage
sstab1.tab = 0 or
sstab1.tab = 1 or
sstab1.tab = 2 or
I'm using the tabstrip though, not the sstab one??
-
Feb 4th, 2003, 07:32 AM
#4
Let me in ..
Originally posted by peach12
I'm using the tabstrip though, not the sstab one??
thats the point, why are you using TabStrip and not Sstab ?
-
Feb 4th, 2003, 07:34 AM
#5
Thread Starter
Member
Originally posted by techyspecy
thats the point, why are you using TabStrip and not Sstab ?
I didn't know about sstab until now and I have a load of frames and everything on the tabstrip so I don't really want to change it
-
Feb 4th, 2003, 07:36 AM
#6
Let me in ..
Originally posted by peach12
I didn't know about sstab until now and I have a load of frames and everything on the tabstrip so I don't really want to change it
Well then god bless you.
-
Feb 4th, 2003, 08:09 AM
#7
Addicted Member
I would copy all your frames over to an sstab.
-
Feb 4th, 2003, 09:58 AM
#8
PowerPoster
Well
Although I do agree that SSTAB control is better, I will answer the question you asked...
Assumes TabStrip with 3 tabs :
VB Code:
Private Sub TabStrip1_Click()
If Me.TabStrip1.Tabs(1).Selected = True Then
MsgBox 1
ElseIf Me.TabStrip1.Tabs(2).Selected = True Then
MsgBox 2
ElseIf Me.TabStrip1.Tabs(3).Selected = True Then
MsgBox 3
End If
End Sub
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Feb 4th, 2003, 10:18 AM
#9
James, that code does not select a tab on form load.
I think he means something like this:
VB Code:
Private Sub Form_Load()
TabStrip1.Tabs(2).Selected = True ' selects second tab
End Sub
-
Feb 4th, 2003, 10:21 AM
#10
Addicted Member
i find sstab is much better to use
only people from jamie's kitchen use tab strip
The internet is a great tool. Many people like me suffer in the real world when there are so many people with the "O he is so good looking he has no troubles, why help him out with anything" attitude.
-
Feb 4th, 2003, 10:22 AM
#11
PowerPoster
Well
Originally posted by Frans C
James, that code does not select a tab on form load.
I think he means something like this:
VB Code:
Private Sub Form_Load()
TabStrip1.Tabs(2).Selected = True ' selects second tab
End Sub
Sorry, I misread...
I thought the goal was to determine clicked tab...
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Feb 4th, 2003, 10:28 AM
#12
Originally posted by stewie
i find sstab is much better to use
only people from jamie's kitchen use tab strip
I agree with you in most cases. I only use the tabstrip, if multiple tabs share the same controls, and I only need the strip, and the click event (to modify the data in the controls).
-
Feb 4th, 2003, 10:30 AM
#13
I believe this is what you're after (substitute "2" for whatever tab you want to be selected):
VB Code:
Set TabStrip1.SelectedItem = TabStrip1.Tabs(2)
"It's cold gin time again ..."
Check out my website here.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|