Highlighting tabs in a TabControl

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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
.



Relevant Pages

  • Setting focus for TabControl
    ... I have a TabControl in my Windows Mobile 5.0 application running .NET CF ... I have a requirement that needs to be able to switch between tab pages ...
    (microsoft.public.dotnet.framework.compactframework)
  • RE: Null Reference Exception after Forms.TabPageCollection.Remove(
    ... Yes, the Form has a TabControl on it, which is why a tab page was being ... The tab pages contain a variety of controls. ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: TabControl
    ... > * set the selectedFont property to the default + Bold ... > * Click on a tab so as the tabcontrol has focus. ... > * Corruption ocurrs in the drawing of the text under the mouse pointer. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Tab control question
    ... If you have the tab names stored in a table, rkc's method is what to use. ... I-1 is used because page numbering on a tabcontrol begins with 0. ... Need appointment scheduling? ... Putting the subforms on pages of the tabcontrol will be ...
    (microsoft.public.access.formscoding)
  • Re: Sharing a component across multiple tabs
    ... I did try the tab control ... how about making a tab control that is only as tall as the tabs ... I have to use the TabControl - our users expect it as a result ... TabControl next to the data panel, but make it look as if it is the ...
    (microsoft.public.dotnet.framework.windowsforms)