TabControl's background color

T

TroLoo

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.
 
M

Mick Doherty

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.
http://dotnetrix.co.uk/controls.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top