Results 1 to 4 of 4

Thread: Custom TabStrip with regular Buttons?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2005
    Posts
    30

    Custom TabStrip with regular Buttons?

    I am using the MS TabStrip control in the button view and I realized something tonight I never saw before...
    You cannot change the colors!
    It has to be that old ugly grey color :-\

    So my question is sort of two part:

    1) Anyone figured outa wait to paint the TabStrip control?
    2) If not, does anyone know of a way to use regular VB buttons and have the one that is being clicked stay down until the next one is clicked like the TabStrip control does?
    I imagine it would also need to get rid of the "focus rectangle" that is drawn on the buttons also.

    I have seen #2 before somewhere. It seems like it has been a few years thought at least.
    I tried searching the forums here before asking but am not quite sure of a good search query that would pull this info up!

    Thanks for any ideas.

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Custom TabStrip with regular Buttons?

    2) If not, does anyone know of a way to use regular VB buttons and have the one that is being clicked stay down until the next one is clicked like the TabStrip control does?
    Use the Option Button control and set the Style property to Graphical.

    I imagine it would also need to get rid of the "focus rectangle" that is drawn on the buttons also.
    Move the focus from the option button to a control on the current tab.

  3. #3
    New Member wspguy's Avatar
    Join Date
    Sep 2005
    Location
    South Carolina
    Posts
    13

    Re: Custom TabStrip with regular Buttons?

    I agree with using the Option Control and making it graphical, but you could skip the tab strip and use control arrays of Option buttons and frames.

    Use the same amount of Options as Frames, making the frames all the same size and position...
    VB Code:
    1. Private Sub Option1_Click(Index As Integer)
    2.     Frame1(Index).ZOrder
    3. End Sub

    Then, the option button stays pressed and the current frame is on top.

  4. #4
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Custom TabStrip with regular Buttons?

    Make your own tab strip control. It is very simple using a few pictures and a few picture boxes.

    I posted a simple example here: http://www.vbforums.com/showthread.php?t=309279

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