Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / June 2005

Tip: Looking for answers? Try searching our database.

Highlighting tabs in a TabControl

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rossum - 22 Jun 2005 21:49 GMT
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
Mick Doherty - 23 Jun 2005 08:07 GMT
Only through ownerdraw. See the examples on my site:
http://dotnetrix.co.uk/tabcontrols.html

Signature

Mick Doherty
http://dotnetrix.co.uk/nothing.html

>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
[quoted text clipped - 21 lines]
>
> The ultimate truth is that there is no ultimate truth
rossum - 23 Jun 2005 22:09 GMT
On Thu, 23 Jun 2005 08:07:12 +0100, "Mick Doherty"
<EXCHANGE#WITH@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]>
wrote:

>Only through ownerdraw. See the examples on my site:
>http://dotnetrix.co.uk/tabcontrols.html

Thanks for that Mick.  I was afraid the answer was going to be along
those lines.

rossum

The ultimate truth is that there is no ultimate truth
Mick Doherty - 24 Jun 2005 11:20 GMT
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).

Signature

Mick Doherty
http://dotnetrix.co.uk/nothing.html

> On Thu, 23 Jun 2005 08:07:12 +0100, "Mick Doherty"
> <EXCHANGE#WITH@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]>
[quoted text clipped - 9 lines]
>
> The ultimate truth is that there is no ultimate truth

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.