Java SWT - Set ForeGround/Background Color of CTabItem (of CTabFolder)

3.7k views Asked by At

I'm using a CTabFolder with several CTabItems. I would like to be able to set the background and foreground color of only a single CTabItem's tab.

There is an option for me to set the Font, but I can't find anything for the color or background of just the TabItem itself. Can anyone help?

1

There are 1 answers

0
Sorceror On

Similar question was already addressed in How to correctly style borders of a CTabItem.

It's possible to set foreground (font) color and background (tabitem itself) color/gradient for selected and not selected (others) tabitems, see CTabFolder javadoc.

To do it just for one custom tabitem, you'll have to write your own CTabFolderRenderer, but it's really heavyweight solution.