PDA

View Full Version : [CLOSED] ToggleToolItem - setWidth - isse



fother
26 Mar 2009, 5:50 AM
isn't possible set the width

code example


public void onModuleLoad() {

ToggleToolItem one = new ToggleToolItem("my text");
one.setWidth("500px");

ToolBar toolbar = new ToolBar();
toolbar.add(one);

ContentPanel panel = new ContentPanel();
panel.setSize(600, 200);
panel.setTopComponent(toolbar);

RootPanel.get().add(panel);
}

sven
26 Mar 2009, 5:52 AM
This is not a bug. This a currently by design.

fother
26 Mar 2009, 5:54 AM
wow...

you can correct me?

sven
26 Mar 2009, 5:55 AM
ToggleToolItem is a Component. Component doesnt support sizes.

sven
26 Mar 2009, 6:09 AM
This was changed in 2.0 code already. Buttons and Toolbars were completly refactored.