I can't hide header on a Panel

HI all

I have a table in a Panel cause i’ve to scroll table in horizontal.
I don’t want any border or separator between title and contents. So I used Runo.PANEL_LIGHT but in this case, horizontal scrollbar desappears!

Any solutions?

 Panel panel = new Panel();
        panel.setWidth("780px");
        panel.addStyleName(Runo.PANEL_LIGHT); //this hinner scrollbar
        panel.setImmediate(true);
        panel.setScrollable(true);
        panel.setContent(layout); //layout with a table
        panel.getContent().setSizeUndefined();

Hi,

The content area of Panel has “overflow: auto” CSS property by default, so if the content is bigger than the area in a certain direction (and the size is not undefined in that direction), the scrollbar for that direction will appear automatically. The light style should not have effect on that, but it may enlarge your content area just enough so that the content fits it, and hence you get no scrollbars.

Panel won’t get scrollbar if the size is undefined (in the relevant direction), but you have set a fixed width, so it’s as it should be. The content just isn’t big enough, but your code excerpt doesn’t show how you size it.

The setImmediate() or setScrollable() have no effect on scrolling or really anything else on Panel. You are using Vaadin 6? The setScrollable() was removed in Vaadin 7 to avoid the confusion, as it had really nothing to do with scrollbars, but just enabled scrolling programmatically.

Ok, thanks :slight_smile: