Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Background image on CTabItem tab
Background image on CTabItem tab [message #667561] Fri, 29 April 2011 14:34 Go to next message
Andrei Shabalin is currently offline Andrei ShabalinFriend
Messages: 7
Registered: April 2011
Junior Member
Hello. I have my custom style for CTabFolder and its items like this:


CTabFolder.editorTab {
  background-color: rgb( 255, 255, 255 );
  border: 1px solid rgb( 127, 155, 207 );
  color: black;
  padding: 2px;
 }

CTabItem.editorTab:selected {
  background-color: rgb( 255, 255, 255 );
  color: black;
  background-image:none;
}

CTabItem.editorTab:hover {
  background-image: url( resources/images/view/bg_tab_hover.gif );
  color: black;
}

CTabItem.editorTab {
   background-image: url( resources/images/view/bg_tab_unactive.gif );
  color: black;
}


I dont know why, but unselected items doesnt have the background image on tabs. If I set the background image to the CTabItem.editorTab:selected it works properly and background image is presented.
Also hover image doesnt shown too.

How can I set the background image on unselected CTabItem tab?





[Updated on: Tue, 03 May 2011 12:06]

Report message to a moderator

Re: Backgorund image on CTabItem tab [message #667593 is a reply to message #667561] Fri, 29 April 2011 19:11 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Andrei,
which version of RAP are you using?
Best,
Ivan

On 4/29/2011 5:34 PM, Andrei Shabalin wrote:
> Hello. I have my custom style for CTabFolder and its items like this:
>
>
>
> CTabFolder.editorTab {
> background-color: rgb( 255, 255, 255 );
> border: 1px solid rgb( 127, 155, 207 );
> color: black;
> padding: 2px;
> }
>
> CTabItem.editorTab:selected {
> background-color: rgb( 255, 255, 255 );
> color: black;
> background-image:none;
> }
>
> CTabItem.editorTab:hover {
> background-image: url( resources/images/view/bg_tab_hover.gif );
> color: black;
> }
>
> CTabItem.editorTab {
> background-image: url( resources/images/view/bg_tab_unactive.gif );
> color: black;
> }
>
>
> I dont know why, but unselected items doesnt have the background image
> on tabs. If I set the background image TabItem.editorTab:selected it
> works properly and background image is presented. Also hover image
> doesnt shown too.
>
> How can I set the backgorund image on unselected CTabItem tab?
>
>
>
>
>
>
Re: Backgorund image on CTabItem tab [message #667978 is a reply to message #667593] Tue, 03 May 2011 08:11 Go to previous messageGo to next message
Andrei Shabalin is currently offline Andrei ShabalinFriend
Messages: 7
Registered: April 2011
Junior Member
I'm using RAP 1.3 And I have some reasons that cannot allow me to update to 1.4
Re: Backgorund image on CTabItem tab [message #667999 is a reply to message #667978] Tue, 03 May 2011 09:53 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Andrei,
did you set the custom variant "editorTab" on the CTabItems as well?
Best,
Ivan

On 5/3/2011 11:11 AM, Andrei Shabalin wrote:
> I'm using RAP 1.3 And I have some reasons that cannot allow me to
> update to 1.4
Re: Backgorund image on CTabItem tab [message #668014 is a reply to message #667999] Tue, 03 May 2011 11:55 Go to previous messageGo to next message
Andrei Shabalin is currently offline Andrei ShabalinFriend
Messages: 7
Registered: April 2011
Junior Member
Ivan Furnadjiev wrote on Tue, 03 May 2011 05:53
Andrei,
did you set the custom variant "editorTab" on the CTabItems as well?



Yes, I did. Maybe I need to set it also when tab become selected or unselected?
Re: Backgorund image on CTabItem tab [message #668025 is a reply to message #668014] Tue, 03 May 2011 12:32 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Andrei,
no... it's not needed to set the custom variant on item selection.
Best,
Ivan

On 5/3/2011 2:55 PM, Andrei Shabalin wrote:
> Ivan Furnadjiev wrote on Tue, 03 May 2011 05:53
>> Andrei,
>> did you set the custom variant "editorTab" on the CTabItems as well?
>
>
> Yes, I did. Maybe I need to set it also when tab become selected or
> unselected?
>
Re: Backgorund image on CTabItem tab [message #668031 is a reply to message #668025] Tue, 03 May 2011 13:12 Go to previous messageGo to next message
Andrei Shabalin is currently offline Andrei ShabalinFriend
Messages: 7
Registered: April 2011
Junior Member
Ivan Furnadjiev wrote on Tue, 03 May 2011 08:32
Hi Andrei,
no... it's not needed to set the custom variant on item selection.



I set the custom variant "editorTab" when creating CTabItem. And also I set it to CTabFolder. But style works only for selected item. Sad
Re: Backgorund image on CTabItem tab [message #668048 is a reply to message #668031] Tue, 03 May 2011 14:09 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Andrei,
I've just checked it with RAP from CVS HEAD. "hover" state is not
available for CTabItems - see [1] and currently, the background-image
property is used only for selected tab.
There is already a bug opened [2] for improving the CTabFolder
theme-ability. If you need these, please add a comment to the bug.

[1]
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. rap.help/help/html/reference/theming/CTabFolder.html

[2] 292122: [Theming][CTabFolder] Improve CTabFolder theming
https://bugs.eclipse.org/bugs/show_bug.cgi?id=292122

Thanks,
Ivan

On 5/3/2011 4:12 PM, Andrei Shabalin wrote:
> Ivan Furnadjiev wrote on Tue, 03 May 2011 08:32
>> Hi Andrei,
>> no... it's not needed to set the custom variant on item selection.
>
>
> I set the custom variant "editorTab" when creating CTabItem. And also
> I set it to CTabFolder. But style works only for selected item. :(
Re: Backgorund image on CTabItem tab [message #668065 is a reply to message #668048] Tue, 03 May 2011 15:06 Go to previous message
Andrei Shabalin is currently offline Andrei ShabalinFriend
Messages: 7
Registered: April 2011
Junior Member
Ivan Furnadjiev wrote on Tue, 03 May 2011 10:09
Hi Andrei,
I've just checked it with RAP from CVS HEAD. "hover" state is not
available for CTabItems - see [1] and currently, the background-image
property is used only for selected tab.
There is already a bug opened [2] for improving the CTabFolder
theme-ability. If you need these, please add a comment to the bug.

[1]
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. rap.help/help/html/reference/theming/CTabFolder.html

[2] 292122: [Theming][CTabFolder] Improve CTabFolder theming
https://bugs.eclipse.org/bugs/show_bug.cgi?id=292122

Thanks,
Ivan



OK. Thanks for the replies. I'll wait for a solution, or try to dig deeper by myself Smile
Previous Topic:jpeg images drawing in rap
Next Topic:Decorated Form Header and Toolbar
Goto Forum:
  


Current Time: Thu Mar 28 21:35:53 GMT 2024

Powered by FUDForum. Page generated in 0.10285 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top