PDA

View Full Version : show button border before hovering



bhomass
26 Jul 2010, 3:34 PM
the buttons on a toolbar appear as just text until user hovers the cursor over it. then the border appears. I have request to show the button borders always. how do you adjust for that?

garyk78
27 Jul 2010, 8:50 AM
Button btnMenu = new Button("Меню"){

@Override
protected void onRender(Element target, int index) {
super.onRender(target, index);
onMouseOver(null);
}

@Override
protected void onMouseOut(ComponentEvent ce) {
}
};


ToolBar toolMenu = new ToolBar();
toolMenu.add(btnMenu);

sven
27 Jul 2010, 8:52 AM
I would look at the css and change it to what you need. There is no subclass required for this, but also possible if CSS knowledge is not that high.