How to style a standard GWT component (TabBar) differently?

Posted by Mike Petterson on Stack Overflow See other posts from Stack Overflow or by Mike Petterson
Published on 2010-05-31T09:35:04Z Indexed on 2010/05/31 9:43 UTC
Read the original article Hit count: 232

Filed under:
|

I am using a TabBar and I want to style the component in different ways. So one time this style, another time that style. I thought this will work but it didn't:

TabBar t = new TabBar();
t.addTab( "1" );
t.addTab( "2" );
t.addStyleName( MyResources.INSTANCE.css().slickTab() );

And:

public interface MyCssResource extends CssResource
{
String slickTab();
}

In the CSS

.slickTab .gwt-TabBar .gwt-TabBarItem {
background-color: #ff0000;
font-weight: normal;
}

But the appearance don't change. What I am doing wrong?

© Stack Overflow or respective owner

Related posts about css

Related posts about gwt