开发者

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

开发者 https://www.devze.com 2023-03-27 15:02 出处:网络
I\'m using a CTabFolder with several CTabItems.开发者_StackOverflow中文版I would like to be able to set the background and foreground color of only a single CTabItem\'s tab.

I'm using a CTabFolder with several CTabItems. 开发者_StackOverflow中文版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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号