TabControl's background color

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TroLoo

    #1

    TabControl's background color

    Hi,

    I'm fighting with it for a while... How can I change this control's
    background color (and only background color)? It should be easy and
    straightforward but I guess it is not...

    To be precised, I don't want to change TabPage's background :-/ What I
    mean is the background before any TabPage is added.

    Sorry for stupid explanation but I run out of ideas and want to avoid
    creating colored panel on top of it until first tab is added.

    Hope you have some ideas.

    --
    Greetings,

    TroLoo
  • Mick Doherty

    #2
    Re: TabControl's background color

    BackColor is not supported by TabControl. To change it you must take
    responsibilty of drawing the entire control since Paint and PaintBackground
    events are not exposed. This is going to be a lot work. For a simple example
    see the "A completely ownerdraw Tabcontrol" example on my site
    (http://dotnetrix.co.uk/tabcontrols.html )

    As an alternative you may like to use TabControlEX instead which has had all
    the work done already and adds one or two other frequently requested
    features.
    Download custom Windows Forms controls and components for .NET applications. TabControlEx, MenuSkinner, and more.


    --
    Mick Doherty
    Dotnetrix offers Nothing. Standard and Premium versions available.



    "TroLoo" <troloo@gmail.c om.REMOVE.IT> wrote in message
    news:uqZLvYsdFH A.2984@TK2MSFTN GP15.phx.gbl...[color=blue]
    > Hi,
    >
    > I'm fighting with it for a while... How can I change this control's
    > background color (and only background color)? It should be easy and
    > straightforward but I guess it is not...
    >
    > To be precised, I don't want to change TabPage's background :-/ What I
    > mean is the background before any TabPage is added.
    >
    > Sorry for stupid explanation but I run out of ideas and want to avoid
    > creating colored panel on top of it until first tab is added.
    >
    > Hope you have some ideas.
    >
    > --
    > Greetings,
    >
    > TroLoo[/color]


    Comment

    Working...