2015-11-07 25 views

回答

0

正如第5版Vaadin7手冊所述,您可以將事件監聽器附加到Button

button.addClickListener(new Button.ClickListener() { 
    public void buttonClick(ClickEvent event) { 
     // show the button has been clicked with a CSS class: 
     button.addStyleName("v-button-clicked"); 
    } 
}); 

不要忘了定義v-button-clicked類。當然,你可以自由地通過.addStyleName()方法添加你喜歡的類。

+0

哦,我沒有想到風格!對我感到羞恥,謝謝! – Zeezl

相關問題