PDA

View Full Version : [CLOSED] rc2 - toolbar and checkbox



fother
6 Jul 2009, 6:10 AM
when add a checkbox in a toolbar, should be centralize in a vertical.. :)



public void onModuleLoad() {

CheckBox checkBox = new CheckBox();
checkBox.setBoxLabel("my checkbox");

ToolBar toolBar = new ToolBar();
toolBar.add(new Button("button 1"));
toolBar.add(new Button("button 2"));
toolBar.add(new Button("button 3"));
toolBar.add(new Button("button 4"));
toolBar.add(new Button("button 5"));
toolBar.add(checkBox);

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

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

sven
6 Jul 2009, 6:28 AM
A toolbar is a container now. You have to do that. I am closing this issue.