I'm not sure, if that's a bug, or if I'm just missing something.
I have a VerticalLayoutContainer with some widgets. Since sometimes there is not enough space to show all widgets, I added a AutoY-ScrollSupport to that container:
Code:
public void onModuleLoad(){
VerticalLayoutContainer con = new VerticalLayoutContainer();
TextButton textButton =
new TextButton("QQQWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWQQQ");
ContentPanel dummyPanel = new ContentPanel();
dummyPanel.setHeight(400);
ScrollSupport scroll = new DefaultScrollSupport(con.getElement());
scroll.setScrollMode(ScrollMode.AUTOY);
con.add(textButton, new VerticalLayoutData(1, -1));
con.add(dummyPanel, new VerticalLayoutData(1, -1));
Viewport vp = new Viewport();
vp.add(con);
RootLayoutPanel.get().add(vp);
}
When the browser window is too small to display the button and the dummy container, the scroll bar is visible. The only problem is: that scrollbar is overlapping the actual content:
Before:
scroll_before.jpg
After (reduce the window height to make the scrollbar visible):
scroll_after.jpg
The button illustrates the problem, since it wasn't resized but overlapped.
Thanks in advance!