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

SSTab1 - Change font color on individual tabs ???

Status
Not open for further replies.

suel

Programmer
May 9, 2002
13
GB
I have a control SSTab1 - with 5 tabs. The 5th tab contains validation errors, and I would like the caption 'Errors' to appear in red, if errors occur for the particular record being viewed....

I only appear to be able to change ALL the tab caption font colors ......

Has anyone found a way to do this ????

Many thanks

Suel
 

There is no way to change the color of just one tab caption (well I guess that with the proper subclassing you can do just about anything).
CCLINT has a solution at thread222-255701
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 

I just read my answer there.
And I must have tired when I typed it, as it is a little difficult to understand.

Basically, you are creating 2 bitmaps for each Tab - one for the active state, and one for the inactive state.

Then at run time, on the form load, set all sstab captions to vbNullString.
And then on the SSTab's Click event, just assign the correct bitmaps to the Tab's Picture Property (the Inactive picture to the previous Tab and the Active picture to the New Active Tab.

Make the backcolor of the bitmaps the same color as the SSTab.
I believe the SSTab color is not affected by any system color changes, and will always be light grey.




[/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top