TabFolder button bar background colour/transparent [message #1064003] |
Mon, 17 June 2013 08:52 |
|
Hi RAP team,
I would like to be able to set the unused area to the right of TabItems in a TabFolder to have a transparent background - is this possible?
Currently it takes up space that I would like to be able to use for other controls. In my example it is white, but I am not sure where this colour is defined... perhaps OS level?
This is the portion I am referring to:
I'm not sure if SWT provides this ability either, but it seems odd if it doesn't at all...?
Thanks, John
---
Just because you can doesn't mean you should
|
|
|
Re: TabFolder button bar background colour/transparent [message #1064033 is a reply to message #1064003] |
Mon, 17 June 2013 11:14 |
Ivan Furnadjiev Messages: 2427 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi John,
the background color of this area is controlled by TabFolder background
color property. This property is not themeable yet - see
283874: [Theming][TabFolder] Improve themeabilty for TabFolder
https://bugs.eclipse.org/bugs/show_bug.cgi?id=283874
You could change it by code TabFolder#setBackground( Color ), but it's
not possible to set it to transparent without theming support.
HTH,
Ivan
On 6/17/2013 11:52 AM, John Gymer wrote:
> Hi RAP team,
> I would like to be able to set the unused area to the right of TabItems in a TabFolder to have a transparent background - is this possible?
> Currently it takes up space that I would like to be able to use for other controls. In my example it is white, but I am not sure where this colour is defined... perhaps OS level?
> This is the portion I am referring to:
>
> I'm not sure if SWT provides this ability either, but it seems odd if it doesn't at all...?
> Thanks, John
>
--
Ivan Furnadjiev
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
Re: TabFolder button bar background colour/transparent [message #1064053 is a reply to message #1064033] |
Mon, 17 June 2013 12:44 |
|
Thanks again Ivan.
SetBackground on the TabFolder is a start, so that is good.
Do you think the themability of TabFolder to support transparency will come any time soon?
Strangely I couldn't get SetBackground to work in SWT for a TabFolder, so I wonder if this is something that RAP is better at already? Do you happen to know if it is supposed to work for SWT?
In SWT, setting the background colour of a TabFolder actuall sets the background of the contained control (Composite), rather than affecting the unused area of next to the TabItems. Not sure how to set that unused area's colour in SWT!
Thanks, John
---
Just because you can doesn't mean you should
[Updated on: Mon, 17 June 2013 12:47] Report message to a moderator
|
|
|
Re: TabFolder button bar background colour/transparent [message #1064056 is a reply to message #1064053] |
Mon, 17 June 2013 12:58 |
|
Further investigation shows that in RAP, as long as I don't set the background colour of the TabFolder, it WILL inherit the parent's background anyway, and effectively be transparent! Just had to ensure that myTabFolder.setBackgroundMode(RAPIDE.TECH_INHERIT); was used too.
I still don't understand SWT correctly though, as there seems to be some inheritance from the underlying operating system going on, and I know this isn't the correct forum to be asking questions about SWT... but thought you might know how it works, since you've modelled RAP on SWT.
Thanks
---
Just because you can doesn't mean you should
|
|
|
Powered by
FUDForum. Page generated in 0.04003 seconds