CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Help with sstab

  1. #1
    Join Date
    Jan 2000
    Location
    Oslo, Norway
    Posts
    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?


  2. #2
    Join Date
    Jan 2000
    Location
    CA
    Posts
    52

    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...


  3. #3
    Join Date
    Jan 2000
    Posts
    1

    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
  •  





Click Here to Expand Forum to Full Width

Featured