Scrollbar not working


I am new to Vaadin.
I have a Tabsheet which has a Panel. Panel has a Vertical layout with components inside.

TabSheet reportsTabsheet;
Panel mainPanel;
VerticalLayout mainLayout;

//These components are inside the mainLayout
ReportParametersComponent reportParametersHeader; // Custom Component
ComboBox reportTypes;
FormLayout reportLayout; // Dynamically changing contants based on the combo selection


I don’t get a scrollbar either in mainPanel or in the browser when the contents of the size of the reportLayout exceeds the browser size.

Please help.


Hi Futura,

the best way to play with the components and understand what happens when the size is undefined, 100%, relative or absolute is undoubtedly the Vaadin Designer (plugin for Eclipse on Eclipse marketplace).
Say new->Vaadin->Vaadin Design and switch to the Vaadin perspective.

You don’t quite show which component is inside what other so it’s hard to see where the problem is.
Fact is that that the panel will start to show scroll bars when its content exceeds its size.
So if you have done panel.setContent(mainLayout) then the scroll bars appear once the mainLayout takes a size which is bigger than the panel. Since mainLayout did mainLayout.setSizeUndefined() the mainLayout takes the size of its content.
I cannot tell about the reportLayout but it’s the same there – if you set it as the content of a panel and give it an absolute size bigger than the panel (or setSizeUndefined and make the contents have some absolute size) the scroll bars will appear.

Did this help?

HTH+Best Regards,