6

I'm trying to get a SmartGWT Window sizing based on its contents.

The correct way of adding elements to a Window it's through the addItem method.

So, when I run this code, the Window do not get resized. However, if I add the Label through addMember the resizing works fine but this break the Window appearance

Window window = new Window();
window.setOverflow(Overflow.VISIBLE);

window.addItem(new Label("aaaaaaaa"));
window.addItem(new Label("aaaaaaaa"));
window.addItem(new Label("aaaaaaaa"));
window.addItem(new Label("aaaaaaaa"));
window.addItem(new Label("aaaaaaaa"));
window.show();

Any ideas ?

Using SmartGWT 2.5

Jean-Michel Garcia
  • 2,359
  • 2
  • 23
  • 44

1 Answers1

6

I missed the AutoSize property... Works as expected

window.setAutoSize(true);
Jean-Michel Garcia
  • 2,359
  • 2
  • 23
  • 44