|
-
January 18th, 2000, 04:59 AM
#1
Help with sstab
I have some problems with the sstab control in vb6.
I have a sstab with three tabs on it and a label wich I want to change caption after wich tab I press on
the sstab. How do I do that?
-
January 20th, 2000, 09:31 AM
#2
Re: Help with sstab
This is a simple solution, please feel free to experiment with other options.
1) Create a new Standard EXE project
2) Add an SSTab to Form1 (don't modify it at all)
3) Paste the following into the code window for Form1:
option Explicit
private Sub SSTab1_Click(PreviousTab as Integer)
Dim myIndex as Integer
myIndex = SSTab1.Tab
SSTab1.TabCaption(myIndex) = "new Caption"
End Sub
Run the project.
As you click on a new tab, the tab caption is changed to "New Caption"
Good Luck...
-
January 20th, 2000, 10:58 AM
#3
Re: Help with sstab
and if you want to change the caption on the label:
Where JimmyT put:
myIndex = SSTab1.Tab
SSTab1.TabCaption(myIndex) = "new Caption"
replace the SSTab1... with:
label1.caption = SSTab1.TabCaption(myIndex)
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
|