Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Adding scrollbar to a subwindow

berk gultekin
7 years ago Jun 20, 2015 10:04am

In my vaadin code I create a subwindow and when i open this subwindow there is no problem. But when i resize my mainwindow(when i make it smaller) my subwindow remains same.I cant see the downwards of my subwindow, there isn't also scrollbar. I want to add scrollbar to it so when i make my mainwindow smaller i want to see whole content of my subwindow with a scrollbar.(I don't know whether there is an other way than a scrollbar)

I tried so far:

  • adding my layout to a panel,
  • setting my subwindow size undefined and setting its content size full.

When I setSizeFull my subwindow it has scrollbars, so i can see whole content of it whether my main window's is big or very small. But I don't want full size subwindow. I want a solution without making its size full.

I'm stuck with this issue if you have any idea i would appreciate.

public class Awindow extends Window{
  ...
  public Awindow(...)
    setModal(true);
    setCaption("Hello");
    VerticalLayout layout = new VerticalLayout (
    memberTable,
    new HorizontalTable(
      createButton,
      eraseButton)
    );
    layout.setSpacing(true);
    ...
    this.setContent(layout);
}
Jon Inazio Sánchez Martínez
7 years ago Jun 24, 2015 2:08pm