Grolsch
Grolsch

Reputation: 387

Height of a Vaadin HorizontalSplitPanel

Hi I am implementing an application in Vaadin where I have a HorizontalSplitPanel with two panels which both contain a VerticalLayout (height and width 100%) with search results (therefore the height of both is very high) When the left sides height is larger everything is displayed correctly --> The HorizontalSplitPanel has the computed height from the firstComponent and a Scrollbar is on the surrounding panel. My problem is when the right side is larger the HorizontalSplitPanels height is also computed from the firstComponent and therefore to small for the right side panel which leads to scrollbars for the right side panel which is not desired in my application (there must only be one scrollbar on the right browser side as on standard websites) Is there a way get the height for the HorizontalSplitPanel computed by the larger of the two components?

Upvotes: 0

Views: 2126

Answers (1)

Ross Judson
Ross Judson

Reputation: 1142

Don't set the height of the vertical panels. Just set the width. The height will adapt to whatever you put inside of it, and your horizontal panel will expand to fit the contents. If your horizontal panel is set to be the content of the Panel (where you probably have scrollable set to true), then you don't want the height set on the horizontal panel either.

Upvotes: 0

Related Questions