GWT has two kind of CSS classes: primary and dependent.

By calling setStyleName() you have replaced all CSS classes on the 
TabBarItem which your custom one. This makes your custom CSS class the new 
primary CSS class. When selecting a TabBarItem the implementation calls 
tabBarItem.setStyleDependentName("selected"). Now each TabBarItem contains 
class="<primary-css-class> <primary-css-class>-selected" which means you 
need upper/lowerTabBarItem-selected in your css file.

Instead of setStyleName() you could use addStyleName() which does not 
replace existing CSS classes and instead adds your custom class name to the 
element. You maybe need "!important" in your CSS then to make sure no one 
else overrides your CSS changes defined in your custom class name. That way 
the primary CSS class name is still "gwt-TabBarItem" and thus 
".gwt-TabBarItem-selected" will work.


-- J.


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to