Reputation: 30056
I have some combobox that is defaulted to gwt-ListBox
style. I need to use this style plus my own style that I wrote in module_name.css
when I use cmbobox1.setStyleName("user-defined-style");
I find that the style gwt-ListBox
is ignored.
Upvotes: 0
Views: 192
Reputation: 18861
When you use "setStyleName
" you are replacing all styles of element. When you use "addStyleName
" you're adding styles to existing styles.
Upvotes: 0
Reputation: 190
With complex widgets (those who have dependant styles) like DialogBox you should use:
void setStylePrimaryName(java.lang.String style)
to set base style and update all dependant styles.
Upvotes: 0
Reputation: 8811
Use:
void addStyleName(java.lang.String style)
Adds a secondary or dependent style name to this object.
Upvotes: 2