How can I set grid to the 100% hight?

Hello!
I have simple crud app, with following layouts -
Vertical main layout, which contains horizontal menulayout and currentTable layout which contains grid with the currently open table from db.
I can set the table’s height with the constant number, something like this:
grid.setHeightMode(HeightMode.ROW);
grid.setHeightByRows(d);
But I want it to be screensize dependent, using setSizeFull only makes menu layout and current table layout both 50% of screen, which is not what I want.
How can I set menu “10%” and the current table layout other 90%?
layoutMenu.setHeight(“10%”);
layoutCurrentTable.setHeight(“90%”)
didn’t work.

Hi there… set both components to setSizeFull and use setExpandRation on the parent layout.

// something like that
VerticalLayout mainLayout = new VerticalLayout(layoutMenu, layoutCurrentTable);
mainLayout.setSizeFull();
layoutMenu.setSizeFull();
layoutCurrentTable.setSizeFull();
mainLayout.setExpandRatio(layoutMenu, 1);
mainLayout.setExpandRatio(layoutCurrentTable, 9);

Thanks! It works!
I guess I need to read more about Vaadin basics :slight_smile: