Difference in scrollbar behavior between TabSheet and Panel

Hi. My question in short; using a TabSheet, it seems possible to have layouts nested inside (as the tab component) which have 100% width/height and are still able to trigger the TabSheet scrollbar.
Normally, when working with a Panel for example, once a contained layout has 100% width/height the corresponding horizontal/vertical scrollbar is no longer shown.
What is causing this difference in scrollbar behavior? And more over, how can I replicate this behavior from the TabSheet using a Panel?

My requirements are as follows: there is a gridlayout (GL) with 1 row and 2 columns. In each of the columns is a (lengthy) label.
The goal is that the GL takes 100% width. If the screen is resized, the GL will shrink, but from the moment it “hits” the labels a horizontal scrollbar should be shown.
So, by using a TabSheet instead of a Panel, I’m able to do this:

    [code]

Panel panel = new Panel();
panel.setSizeFull();

    VerticalLayout verticalLayout = new VerticalLayout();
    verticalLayout.setSizeFull();

    TabSheet tabSheet = new TabSheet();
    tabSheet.setSizeFull();

    GridLayout gridLayout = new GridLayout(2,1);
    gridLayout.setSizeFull();

    panel.setContent(verticalLayout);
    verticalLayout.addComponent(tabSheet);
    tabSheet.addTab(gridLayout,"Tab");

    Label label1 = new Label("very very long very very long very very long very very long very very long");
    label1.setSizeUndefined();
    Label label2 = new Label("very very long very very long very very long very very long very very long as well");
    label2.setSizeUndefined();
    gridLayout.addComponents(label1, label2);

    setContent(panel);

[/code]

See attached screenshots

(1.png) Viewport is sized to it’s maximum, the GL is spread over the entire width. The labels are alligned left.
(2.png &2b.png) Viewport is sized very small, the GL shrinks untill no more space was left for the labels to be shown and now a horizontal scrollbar appears
I’m able to see the entire contents of the GL (and thus also the labels) by scrolling. This is exactly what I want.

However, I don’t need tabs for this case, so I was trying to recreate this with a Panel (which should also scroll):

[code]
Panel panel = new Panel();
    panel.setSizeFull();

    VerticalLayout verticalLayout = new VerticalLayout();
    //verticalLayout.setSizeFull(); <-- no longer 'allowed', as no scrollbars shown by Panel otherwise

    GridLayout gridLayout = new GridLayout(2,1);
    //gridLayout.setSizeFull(); <-- no longer allowed as upper container has no longer any dimensions

    Label label1 = new Label("very very long very very long very very long very very long very very long");
    Label label2 = new Label("very very long very very long very very long very very long very very long as well");
    gridLayout.addComponents(label1, label2);

    verticalLayout.addComponent(gridLayout);

    setContent(verticalLayout);

[/code]

The result is that the Panel only shows scrollbars when the layout has a undertermined width/height. But, because of this I’m no longer able to stretch the GL to 100%.
So as can be seen on 3.png and 4.png, I do get scrollbars, but the GL is no longer stretched to the entire width. How can I simulate the behavior I’m getting with the TabSheet?

Thanks

18420.png
18421.png
18422.png
18423.png
18424.png

Hi. I was wondering if anyone from the Vaadin team could shed some light on this?
In the mean time we found a workaround by simply using a TabSheet and hiding the tabs with ‘hideTabs’.
However, I want to be sure that this way of working is the supported way for this case as we don’t want to run into backward compatibility issues in Vaadin x.y when this behavior suddendly changes. Thanks.