Results 1 to 11 of 11

Thread: SSTab array to add as many tabs as you want?

Threaded View

  1. #8
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    10,918

    Re: SSTab array to add as many tabs as you want?

    ams16,

    The code I gave you provides all the clues on how to do that. Once you create a new tab, use the .Tab property to make that new tab the active tab. Then, assuming your picturebox is indexed, use the Load statement to create more copies of it. Once you've got a copy of it, use its .Container property to set your SSTab as the new picturebox's container. Then, the only thing left is to play around with the new picturebox's .Top and .Left property to position it where you want on the tab.

    Basically, I showed you how to do it with a label in the above code. With respect to what you're trying to do, a label and a picturebox would be treated exactly the same.

    Please study my code above. It truly does have the answers in it. Also, try running the attached project and watch what it does. You could just replace my label with a picturebox and basically get exactly what you're asking for.

    Good Luck,
    Elroy

    EDIT1: And just as an FYI, you must set the SSTab's active tab (with the .Tab property) before you set your picturebox's .Container property. The way SSTab works, it's always going to be the active tab. Just as further FYI, the SSTab appears to be a series of containers, but it's not. It's just a single container, regardless of how many tabs it has. It just (internally) moves the contained controls around (out of view) to create the effect/illusion of multiple containers. That's why it's important that the tab you wish to use be set as the active tab before using SSTab as a container for a new control.
    Last edited by Elroy; Sep 28th, 2017 at 12:46 PM.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

Tags for this Thread

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