Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

How can I place few buttons each after another in VerticalLayout?

Jarek Jankowski
6 years ago Nov 08, 2015 6:37pm
William Anthony
6 years ago Nov 09, 2015 3:58am

you can create another VerticalLayout  that has undefined height inside your sidebar.

eg.

layout.setHeight("100%"); /*your sidebar*/

VerticalLayout innerlayout = new VerticalLayout();
innerLayout.setHeightUndefined(); /*optional*/
innerlayout.addComponent(new Button("A"));
innerlayout.addComponent(new Button("B"));
...

layout.addComponent(innerlayout);