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.

Layout formatting

Alex Viscreanu
6 years ago Aug 06, 2015 4:46pm
Anna Koskinen
6 years ago Aug 11, 2015 3:07pm

Hi!

Expand ratio should fix your problem. Something like this:

horizontalLayout.setExpandRatio(label, 1);

If you only have one component with expand ratio set, all the extra space goes to that component. The flip side is that if you run out of space, that same component is the one that gets cut off.
 

Alex Viscreanu
6 years ago Feb 24, 2016 1:06pm