Solved

Selected tab in a Tab Page set?

Posted on 2006-06-11
4
278 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
Comment Utility
What Visual Studio do you use?
0
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 250 total points
Comment Utility
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
Comment Utility
0
 

Author Comment

by:Mr_Fulano
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

771 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

7 Experts available now in Live!

Get 1:1 Help Now