This component is capable of displaying the scrollbar. That is very nice feature. But my requirement is to create a page, where there will be a fixed height header at the top and footer at the bottom. And in the middle there will be a scrollable pane. This can be achieved in Vaadin 8, using Panel. But how to do it in Vaadin 14. Please suggest.
Hi Samudranil. That is possible with this add-on. The clue here is to give a fixed height to the scrollable content too. Then, as long as the height of the VerticalScrollLayout is defined smaller than it actually is, a scroll bar is shown. For example set both header and footer height to 10% (example values!) and the content height to 80%. Now if the content has “too many” components, you can scroll the content.
Hi Kaspar, it works thank you so much. It works with fixed height of header and footer as well. What I missed previously was setting the height and width of the parent layout to 100%. Parent layout is the layout where header, contentArea (VerticalScrollLayout) and the footer is added. So I used parentLayout.setSizeFull(). And it is working as expected.