Differences
This shows you the differences between two versions of the page.
vaadin_splitbutton [2015/04/15 09:24] |
vaadin_splitbutton [2021/04/05 11:23] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Vaadin Splitbutton ====== | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | |||
+ | 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 '' | ||
+ | |||
+ | <sxh java> | ||
+ | CssLayout group = new CssLayout(); | ||
+ | group.addStyleName(" | ||
+ | |||
+ | Button save = new Button(" | ||
+ | group.addComponent(save); | ||
+ | |||
+ | ComboBox box = new ComboBox(); | ||
+ | // this puts the icon in the middle of the rest of the combobox | ||
+ | box.setWidth(" | ||
+ | box.addItem(" | ||
+ | box.addItem(" | ||
+ | box.addItem(" | ||
+ | box.setNewItemsAllowed(false); | ||
+ | box.setTextInputAllowed(false); | ||
+ | group.addComponent(box); | ||
+ | </ | ||
+ | |||
+ | <note tip> | ||
+ | |||
+ | box.setValue(null); | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | {{tag> |