missing vertical scrolls in a accordion component

I have a requirement that the vertical scroll bar should appear whenever the data is more.

There is an accordion component where i am adding the horizontal layout component .But whenever there is huge data inside the horizontal layout the vertcial scroll bar should appear. I have tried setting the following properties (setSizeUndefined(),setSpacing(false),setWidth(“100%”)).and set a default height to the horizontal layout.Anyway the vertical scroll doesnot seem to appear and it clips the data when the height is very less.

accordion.addTab(componentTest.buildComponent(), "Test’, icon1);

Here the buildComponent() method returns the horizontal layout. Could someone please help how can i achieve this?

Layouts do not automatically provide scrollbars. Instead of adding the horizontal layout directly to the Accordion, add a Panel with the horizontal layout as its content. That should give you the scrollbars you need.

Thanks John,

If i use panel and set the content as the Horizontal layout then the horizontal scroll appears.I would like to discard it anyway.
Is there any suggestions for that

I think the suggestion is “don’t.” The panel is what gives you the scroll bar, so if you remove the panel then you remove the scroll bar. Maybe I’m not understanding what you’d like to do.