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

Thread: How can I add a new tab to an SSTab control at a given location?

  1. #1
    Join Date
    Jul 2002
    Posts
    7

    Question How can I add a new tab to an SSTab control at a given location?

    I have a form that has an SSTab control with five tabs on it. I need to update the form and add a new tab. If I update the Tab Count property and TabsPerRow property on the property page at design time from five to six a new tab will be added at the end of the tab list. I want to make the new tab the second tab in the list, not the last tab, how can I do this?


    Thanks for any help.
    Jim

  2. #2
    Join Date
    Apr 2002
    Location
    Cleveland, Ohio, USA
    Posts
    200
    The hard way:
    Add your new tab. Co to the previous tab, select all the controls, cut them, then go to the new tab and paste them. Repeat this until you have moved all the controls to their new locations.

    The easy way: Add your new tab, then save and close your project. Open the .frm file for your form. Find the lines containing "Begin VB.Frame fraTab". This is the first line for each tab. just under it, you will find a line "Index = " and that tab. You edit the index values (2 to 3, 3 to 4, etc.) This will move your controls for you.

    Note that the easy way is dangerous because you are making the input, not VB. Be sure to back up your project before doing this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)