Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TAB Control Extra Formatting

Status
Not open for further replies.

puforee

Technical User
Oct 6, 2006
741
US
I am using a TAB control on my form with 5 TABS. From the properties, I can change the Font type, size, italic, and underline.

However, I would like to change the Font color for each of the little tabs.

I looked in FAQ's and did not see anything that covered this...I might have missed something by not asking the question correctly.

Has anyone found a way to change the color of the tab text? I would want to do this for each tab so they would be different colors. This would make the tabs stand out better.

Or are there other TAB Controls out there that I might be able to use?

Thanks,
 
If you want to modify individual tabs, you end up by "faking" it because there is no properties or way to do it in code.

Most examples I have seen use frames, but it requires a very labor intensive and non flexible method. I like to use a standard tab control and set it's tab control style to "none". That means the control has no visible tabs. Then replace those with Labels. There are a few tricks to make this look good if you are formatting the whole page. In your case it would be simply a matter of putting N labels as a substitute for the tab.

The example shows how you can fake coloring a tab page and formatting the selected tab.
 
Thank you for your answer. So MS flunks again. Ho Hum.
 
You may want to google this and you should find many tricks to get this effect. There are several approaches. I like to stick with using a real tab control and "hiding" the tabs. Then I build fake tabs out of text boxes or labels. Then I fake making the tab appear selected and use the text boxes/labels to control the selected page. This requires less labor and code than other approaches.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top