Results 1 to 7 of 7

Thread: Is it possible to add color to teh tabs in a TabStrip?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Location
    Austin, Texas
    Posts
    97

    Is it possible to add color to teh tabs in a TabStrip?

    I am writing a “browser” that will show PDFs from a medical chart. I am using a TabStrip control.

    The question I have now is: Is it possible to color the tabs, I would like to preserve as much as possible of the original chart organization, and color would be a big asset.

    It would be necessary to do two things: write a specific caption and use a color code, (e.g., Prescriptions in blue, Insurance in yellow, Progress in grey, etc.) This information will come from a data file. So using pictures in the tabs will not be a good solution because they could not be created dynamically. (Sorry, What am I saying?, I do not really know. Is it posiible to create pictures dynamically?)

    I know exactly how to write any caption to the tabs, I need help with the color.

    If some one can suggest how to color the font used on the tabs, that would work too.

    Any ideas?

  2. #2
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    804

    Re: Is it possible to add color to teh tabs in a TabStrip?

    No can do with the common controls tabstrip. You will have to
    write your own UserControl or find one that works for you.

    For example, here are some:
    http://www.planet-source-code.com/vb...teria=tabstrip
    The first one look promising

  3. #3
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: How to color TABS or the Caption in the TABS

    What you are asking is extremely difficult and requires a high degree of knowledge with subclassing. Honestly I think it would be easier to create your own tab control or find a 3rd party version of it or find a project elsewhere that does what you want and works without crashing. Some controls just are not designed for customization & the TabStrip is one of them.

    Another option is to use the SSTab control (Microsoft Tabbed Dialog Control). That has a forecolor option but effects all tabs. To have each of those tabs forecolors different, don't set the caption. Rather place a label on the tab itself and set the forecolor of the label. Make the label background transparent.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: How to color TABS or the Caption in the TABS

    dupe posting... http://www.vbforums.com/showthread.php?t=651070

    please try to not create multiple threads for the same problem... it fragments your responses...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Location
    Austin, Texas
    Posts
    97

    Re: How to color TABS or the Caption in the TABS

    I will not do that again. I did not know how to delete my original posting.

    Thanks

  6. #6
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: How to color TABS or the Caption in the TABS

    Usually all you need to do is report your thread and ask that a mod move it... which I've done...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Is it possible to add color to teh tabs in a TabStrip?

    Duplicate threads merged - please post each question (or variation of it) only once. If you think you have posted in the wrong forum, click the "report" icon on the left of a post (or PM a moderator) to ask for it to be moved.

    Thanks for the report tg

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