GridLayout Scrollbar (missing) bug

I’m pretty sure I found a bug in Vaadin 7 (GC) … or at least I didn’t expect the behavior :slight_smile:

I have attached a series of screen shots from an application that has a pretty normal Form using a GridLayout … As is seen pretty clearly once I cause a Vertical Scroll bar (the right side thing) to appear … and then shrink the window up … the bottom scroll bar does NOT appear even though I should be able (and CAN!) scroll right and left.

If I scroll DOWN – then the scroll bar appears…

So it appears the bottom scroll bar is attached to the actual “container” draw area itself and only shows if I scroll down enough to see it…

Bug?
12828.png
12829.png
12830.png
12831.png
12832.png

I opened this up as a bug


Vaadin Trac Issue

Hi,

I think this might be due to using a TabSheet within another one with the wrong size settings. A bit of code showing how you create the layout would explain more than the screenshots. Anyway, try sizing both of your TabSheets to 100% height, and then setting the form/gridlayout within to an undefined height and see if the scroll bars are in correct place then.

Thanks for the response - I’ll look again for what you suggest but nothing jumped out at me – and I did an “AL” from ?debug and it showed no errors either.

Here’s a quick example of what I meant, seems to work correctly on Vaadin 7.0.1 - both scroll bars are visible as they should be.

package com.example.gridt;

import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.TextField;
import com.vaadin.ui.UI;

@SuppressWarnings("serial")
public class GridtUI extends UI {

    @Override
    protected void init(VaadinRequest request) {
        TabSheet main = new TabSheet();
        main.setSizeFull();
        setContent(main);

        TabSheet sub = new TabSheet();
        sub.setSizeFull();
        main.addTab(sub, "First tab");

        GridLayout gl = new GridLayout(2, 25);
        gl.setSizeUndefined();
        for (int i = 0; i < 50; i++) {
            TextField tf = new TextField("textfield");
            tf.setWidth("250px");
            gl.addComponent(tf);
        }
        sub.addTab(gl, "gridlayout");

    }
}

Please try it out and report back.