User Tools

Site Tools


vaadin_splitbutton

This is an old revision of the document!


Vaadin Splitbutton

Bootstrap has such a nice splitbutton UI component. But with some composition you can have a similar component in Vaadin (with the Valo theme) by using the CssLayout and the v-component-group CSS class.

CssLayout group = new CssLayout();
group.addStyleName("v-component-group");

Button save = new Button("save");
group.addComponent(save);

ComboBox box = new ComboBox();
// this puts the icon in the middle of the rest of the combobox
box.setWidth("45px"); 
box.addItem("refresh");
box.addItem("history");
box.addItem("coordinates");
box.setNewItemsAllowed(false);
box.setTextInputAllowed(false);
group.addComponent(box);

vaadin_splitbutton.1426166951.txt.gz · Last modified: 2015/03/12 13:29 by mihael