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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to 'Bold' selected Tab (on Tab Control) 1

Status
Not open for further replies.

NKA

Programmer
Mar 20, 2002
76
NZ
I can see how to make all tabs 'Bold', but would like all tabs to be normal font unless the focus is on it.

Can this be done at all?

NKA

The answer's always easy - if you know it! ;-)
 
I feel your pain NKA. I don't know of a way to make one tab Bold, but I've found that if you set the Style property of the tab control to Buttons instead of Tabs, it does give the user a little better visibility of which tab is selected.

I once put a small picture (of an arrow) in each tab page, aligned under the tab for that page. It was an improvement.

I just thought of something else though. I noticed that the Style property has 3 values. Tabs, Buttons, and None.

I'll bet if you play around with it a bit, you could use the None style and put your own command buttons just above the tab control. Each command button would not only "open" a page of the tab control, but you could also programmatically set the bold property for the command buttons.

Now that I think of it, there's even more that could be done - although it'll take a little work to set up.

Not only could you use a command button to control the tab pages, but you could set the command button's transparent property to yes so that its clickable but you can't see it. Then you put a label UNDER it (Format/Send to Back) and use the command buttons to control the properties of the labels. For example, the "selected" one could be a different color and it could be sunken (special effect property). And the ones that aren't selected could be raised.

BTW: You want to use the transparent command button over a label because a label doesn't have a click event. And you don't want to use the click event of a textbox because when the cursor is over a textbox it changes to the text insert cursor, wherease the transparent command button will have the familar arrow cursor.

Now if that all works, I'm gonna start using it all the time. Thanks for the question!!
 
Wow! There's certainly some options here to play with!! I have given you a star for this little lot. Many thanks - I will have a play later on. Many thanks

NKA

The answer's always easy - if you know it! ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top