Fixed HorizontalLayout inside SplitPanel

Hi everyone,

I have a HorizontalSplitpanel, with a VerticalLayout inside. Inside the VerticalLayout are a HorizontalLayout containing a MenuBar and a VerticalLayout containing content.

Right now, a scroll bar appears for the wrapping VerticalLayout. However, I would like to fix the HorizontalLayout containing the MenuBar, and scroll only the content VerticalLayout.

How do I achieve this?

Hi Auke,

First of all, you don’t get scrollbars to a VerticalLayout. Instead, you should use a Panel. So as your content, use Panel instead of VerticalLayout and set the VL to be content of the Panel.

What you need:

  1. Set the wrapping VL to be full size (this probably could be removed and use HL directly?)
  2. Add Panel as your content and set it full size
  3. Make sure the VL which is content of the Panel has undefined height ( vl.setHeight(null) )

Works like a charm using the panel. Thanks a lot! :slight_smile: