View Full Version : [CLOSED] Button.setIconStyle doesn't work - rc1

25 Jun 2009, 6:47 PM
String menu[] = {"test1","test2","test3"};
ToolBar tb = new ToolBar();
SelectionListener<ButtonEvent> btnClick = new SelectionListener<ButtonEvent>(){
public void componentSelected(ButtonEvent ce) {


for(int i =0; i< menu.length; i++){
Button btn = new Button(menu[i], btnClick);
btn.setIconStyle("btn-icon-"+i); // <-- this doest work
tb.add(new SeparatorToolItem());

I can't find any buttons with style btn-icon-x which I assigned it.

26 Jun 2009, 2:13 AM
This is not a bug. Iconstyles are transformed into real icons. If you want to have a style assigned you ahve to use addStyleName. I am closing this issue.