// the actual list box panel at the top
panel(new PanelBuilder() {{
childLayoutHorizontal();
control(builders.createLabel("ListBox:"));
control(new ListBoxBuilder("listBox") {{
displayItems(4);
selectionModeSingle();
showVerticalScrollbar();
showHorizontalScrollbar();
width("*");
}});
}});
// the panel for the append button
panel(builders.vspacer());
panel(new PanelBuilder() {{
childLayoutHorizontal();
control(builders.createLabel("Append:"));
control(new ControlBuilder("addTextField", "textfield"));
panel(builders.hspacer("9px"));
control(new ButtonBuilder("appendButton", "Append"));
}});
// the panel for the checkbox to select multi selection and stuff
panel(builders.vspacer());
panel(new PanelBuilder() {{
childLayoutHorizontal();
control(builders.createLabel("Multi Selection:"));
control(new CheckboxBuilder("multiSelectionCheckBox") {{
checked(false);
}});
panel(builders.hspacer("17px"));
control(builders.createShortLabel("Force Selection:"));
panel(builders.hspacer("9px"));
control(new CheckboxBuilder("forceSelectionCheckBox") {{
checked(false);
}});
panel(builders.hspacer("17px"));
control(builders.createShortLabel("Disable Selection:"));
panel(builders.hspacer("9px"));
control(new CheckboxBuilder("disableSelectionCheckBox") {{
checked(false);
}});
}});
// another listbox to display the current selection
panel(builders.vspacer());
panel(new PanelBuilder() {{
childLayoutHorizontal();
control(builders.createLabel("Current Sel.:"));
control(new ListBoxBuilder("selectionListBox") {{
displayItems(4);
selectionModeDisabled();
hideHorizontalScrollbar();
hideVerticalScrollbar();
width("*");