Highlighting tabs in a TabControl

R

rossum

I have a TabControl with a lot of tabs in it. Since it is sometimes
difficult to tell which tab is currently active (all the pages have
the same layout) I want to be able to highlight which tab is currently
active.

My first thought was to change the page's background colour, but that
just changed the background of the page body, not the background of
the page tab at the top. The same happened when I changed the page
font to bold, it affected the body of the page, but not the tab at the
top.

Then I switched to the TabControl itself. Setting text to bold
affected all the page tabs, not just the current one. I couldn't see
a way to switch the background colout, but I suspect that would have
the same effect.

I have resorted to just changing the text: "Page 20" <-> "*Page 20*"
which is a bit clunky and not really satisfying. Is there a better
way to highlight the active tab page label in a TabControl?

Thanks,

rossum



The ultimate truth is that there is no ultimate truth
 
M

Mick Doherty

You could just use TabControlEX which is available from my downloads
section.
http://dotnetrix.co.uk/controls.html

This has the option to select TabColor and SelectedTabColor via the
properties in TabControlEX, or if these are left at default, the tabs are
drawn using their associated tabpages BackColor. (These are new properties
and I'm not sure I like the implementation, but I couldn't think of a better
way to achieve this common request).
 

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