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.

Hide row in GridLayout problem

Andreas Lüdtke
1 decade ago Jan 24, 2012 3:13pm


I have a component that extends GridLayout and it shows several Labels, PopupDateFields and NativeSelects in about 10 rows and 4 columns. Depending on a state variable I need to hide the components of special rows. I'm doing this by hiding all components of a row.

This works so far, but the hidden rows leave some empty space between the displayed rows and that doesn't look very nice. I did already tried the setRowExpandRatio() method with a ratio value of 0 for the hidden rows, but that didn't help either.

Is there a possibility to remove this empty space or do I have to fill the GridLayout with only the visible components?

Thanks in advance


Last updated on Jan, 24th 2012
Mathias Clerc
1 decade ago Jan 25, 2012 12:38am
Andreas Lüdtke
1 decade ago Jan 25, 2012 7:45am
Markus Alfter
1 decade ago Sep 28, 2012 1:17pm
Jan Hink
1 decade ago Oct 01, 2012 2:14pm
Thomas Kiesl
6 years ago Aug 06, 2016 1:24pm
Vesa Tuononen
6 years ago Aug 12, 2016 11:42am