Reputation: 897
I'm using SWT CTabFolder to build tabs in my application. I kind of dislike the visual appearance of tabs, it too Eclipse-like. Is there a way to change the aspects of tabs? I'd like to change the close button for example, the placement of tabs, their appearance maybe...
Upvotes: 5
Views: 878
Reputation: 922
You could use CTabFolder.setRenderer(CTabFolderRenderer renderer)
and implement your own renderer.
If you don't want the code to be portable, on Windows, you can even make it look quite close to the native one, if you use OS.DrawThemeBackground()
method (see parts and states). Unfortunately this method can only be used when themes are enabled, so it will not work on classic theme, because there is no type for tab items to be used with OS.DrawFrameControl()
(see types and states).
Upvotes: 3