Panel: Missing scrollbars

Hello,

i am doing some experiments with Vaadin7-Beta11 for a prototype. Everything is working fine except scrolling.

I create a panel with an image-content. The image-content is larger than the panel, so I expect to see scrollbars. Unfortunately no scrollbars are shown.

Any help is highly appreciated, thnks in advance

code-snippet:

// Serve the image from the theme
Resource rsrc = new ThemeResource(“some-image.jpg”);

// Display the image without caption
Embedded image = new Embedded(null, rsrc);
image.setSizeUndefined(); // Actually the default

// The panel will give it scrollbars. The root layout
// (VerticalLayout) must have undefined width to make the
// horizontal scroll bar appear.
Panel panel = new Panel(“Embedding”);
panel.setWidth(“400px”);
panel.setHeight(“300px”);
panel.setComponent(image);

layout.addComponent(panel);

Works for me; are you extending the CSS or SASS theme?

Thanks a lot, that was the problem.

I created a custom theme and forogt to incluce the parent theme :wink:

I did some further analyses on the problem.

It turned out that i have to include the legacy-css, see thread https://vaadin.com/forum/-/message_boards/view_message/2218205.

After including “legacy-styles.css” instead of “styles.css” the inhteritance is working fine.

Howver according to the current version of the vaadin7-book i have to include “styles.css”.
Maybe a bug in the vaadin-book (https://vaadin.com/book/vaadin7/-/page/themes.creating.html)?

Yes, most likely. The book is still in draft version, and won’t be finalized until Vaadin 7 has a stable release.