PC Review


Reply
Thread Tools Rate Thread

Highlighting tabs in a TabControl

 
 
rossum
Guest
Posts: n/a
 
      22nd Jun 2005
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
 
Reply With Quote
 
 
 
 
Mick Doherty
Guest
Posts: n/a
 
      23rd Jun 2005
Only through ownerdraw. See the examples on my site:
http://dotnetrix.co.uk/tabcontrols.html

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


"rossum" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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



 
Reply With Quote
 
rossum
Guest
Posts: n/a
 
      23rd Jun 2005
On Thu, 23 Jun 2005 08:07:12 +0100, "Mick Doherty"
<EXCHANGE#(E-Mail Removed).[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
 
Reply With Quote
 
Mick Doherty
Guest
Posts: n/a
 
      24th Jun 2005
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).

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


"rossum" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Thu, 23 Jun 2005 08:07:12 +0100, "Mick Doherty"
> <EXCHANGE#(E-Mail Removed).[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



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tabcontrol without the tabs =?iso-8859-1?Q?Ant=F4nio_Jos=E9_Formiga_Neves?= Microsoft C# .NET 1 20th Nov 2007 08:56 PM
I need a gap between two tabs in a TabControl. Could anyone help? nvx Microsoft Dot NET Framework Forms 3 29th Jul 2006 04:32 AM
Re: Tabs on Top Right in TabControl Martin Hill Microsoft Dot NET Framework Forms 0 21st Sep 2004 04:00 AM
Re: Tabs on Top Right in TabControl Roy Soltoff Microsoft Dot NET Framework Forms 1 2nd Sep 2004 08:04 AM
Tabs in a TabControl Alberto Microsoft C# .NET 4 1st Jul 2004 06:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:58 AM.