Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic SStab. How to place a control on each tab 1

Status
Not open for further replies.

bigracefan

Programmer
Apr 2, 2002
304
0
0
US
I have a dynamic SSTab that I want to place listviews on to. My current code place all of the listviews on the first tab. I'm starting out with a listview on the first tab. It's index is 0.

Code:
    For i = 0 To LineNames.Count - 1
        SSTab2.Tabs = i + 1
        SSTab2.TabsPerRow = i + 1
        SSTab2.TabCaption(i) = LineNames.Items(i)
        Load lvSchedule(i + 1)
        lvSchedule(i + 1).Visible = True
        
    Next
 
You need to set the active tab before you add your control.
Code:
For i = 0 To LineNames.Count - 1
        SSTab2.Tabs = i + 1
        SSTab2.TabsPerRow = i + 1
        SSTab2.TabCaption(i) = LineNames.Items(i)
        [b]SSTab2.Tab = SSTab2.Tabs - 1[/b]
        Load lvSchedule(i + 1)
        lvSchedule(i + 1).Visible = True
        
    Next
The line I added makes the last or newest tab the active tab. You can change that if you need.

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top