java - How can I change the color of buttons? -
i'm developing first application in vaadin , can't change color of button (want them blacks). i'm using custom theme inherited reindeer.
i try in way:
buttonsetting = new button(); buttonsetting.seticon(new themeresource("images/icons/16px/setting.png")); buttonsetting.addstylename(reindeer.button_small); buttonsetting.addstylename(reindeer.layout_black);
but doesn't work, how can do?
as far can see reindeer.layout_black should style name of component containing button.
public class adminbar extends customcomponent { private final horizontallayout layout = new horizontallayout(); public adminbar(lang lang) { setcompositionroot(layout); setwidth(100, unit.percentage); layout.setwidth(100, unit.percentage); setstylename(reindeer.layout_black); button button = new button("i'm button"); button.setstylename(reindeer.button_small); layout.addcomponent(button); } }
if set style name of horizontallayout instead of adminbar, whole layout black.
Comments
Post a Comment