Solved

Selected tab in a Tab Page set?

Posted on 2006-06-11
4
280 Views
Last Modified: 2012-06-22
This question is worth 250 points and they will be awarded to the provider of an answer that will help me solve my problem with Tabs.

Hi, I have a Tab Page set with several tabs. When the User clicks on any tab, obviously he/she will see the selected page corresponding to that tab.  However,  I would like to make the actual tab itself stand out more visibly.  In other words, I'd like to either change the color of the tab itself, or even part of it, like Windows XP does with the little orange bar above the text. Or maybe bold the text inside the tab, or change the text’s color, but nothing I do seems to work.  Does anyone know how to make a selected tab stand out more visibly than the others that are not selected?  Any visible change from the other tabs would work, but I wouldn’t want to have to create a custom tab object, as I don’t know exactly how to do that, or if it can even be done.  Currently, I have a label over each tab with the same text in bold font. When the tab is selected, the label becomes visible. When the tab is not selected, the label becomes disabled. I'd like a better way, as this is too combersome when you have many tabs.

Thanks for your help...!

 
0
Comment
Question by:Mr_Fulano
4 Comments
 
LVL 9

Expert Comment

by:jrscherer
ID: 16883384
What Visual Studio do you use?
0
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 250 total points
ID: 16883501
There are a few things you can do to specify which Tab is currently selected
For the Page you can have a different BackColor or Background image for each Tab Page
For the Tab Text you can Add an Image(icon) alongside the Text and you can have the Image change based on the selection.

For eg add an Image List to the form and have 2 images in it Say a RedColored Check Mark and a Greyed Check Mark
Red indicating current selected tab and Greyed indicating Unselected

Now in the Tabcontrol's ImageList property select the ImageList
Now code this in the TabControl1_SelectedIndexChanged Event

For Each TB As TabPage in TabControl1.TabPages
    TB.ImageIndex = 1 'Greyed
Next
TabControl1.SelectedTab.ImageIndex = 0 'Red

However I have assumed you are working on VS 2003
2005 might have something similar or hopefully better
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 16884043
0
 

Author Comment

by:Mr_Fulano
ID: 16890382
Sorry for omitting the verson. I am using VS 2003. Some of the suggestions offered thus far are good. Hopefully they're might be more. If so, I will increase the points and split them.  Thanks again. . .
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now