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

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

How to add a Vertical SrollBar to VerticalLayout

Arun R T
1 decade ago Dec 31, 2011 10:16pm
Jens Jansson
1 decade ago Jan 02, 2012 7:46am

don't have mainLayout as setSizeFull(). that means that the height is calculated to a pixel amount, and everything outside that pixel amount is cut out. The default (setWidth("100%"); setHeight(null);) is good for you, so just remove that row. This will work if you have it inside something that supports scrolling, like the main window. If this layout is inside another layout, then it won't scroll. To get around this problem, use a Panel as that supports scrolling (mainWindow is in fact a sort of a panel). Create a new Panel, set the panel to setSizeFull(); and set the layout as content (setContent(mainLayout).

David Suarez Morell
6 years ago Dec 02, 2016 3:16pm
David Suarez Morell
6 years ago Dec 02, 2016 3:18pm
Debasish Sena
6 years ago Dec 15, 2016 5:17am