MenuBar layout trouble

I’m adding a menu bar, then i’m adding a split panel in response to “new prognosis”>“hybrid” menu action. Problem is that the menu bar sits on something that generates a div, that splits the space in half with whatever i add to the main window, and i can’t tell how to avoid this. I added a sample to test. I don’t want the space marked in blue.
11307.png
11308.war (3.4 MB)

Hi,

I would be more helpful if you’d explain where the menubar is added (layout structure), but I’ll guess:

Your MenuBar and SplitPanel are probably added to a VerticalLayout that is 100% high. You can either set the height to undefined, in which it will take as much space as the content requires, or you can set the expand ratio for the SplitPanel in order to indicate that you want it to take as much space as possible.

parentLayout.setExpandRatio(splitpanel,1f);

Best Regards,
Marc

Yes, this did it for me:
first:

getMainWindow().getContent().setSizeFull();

then:

((VerticalLayout)getApplication().getMainWindow().getContent()).setExpandRatio(hybridSplitPanel, 1);