Sizing SmartGWT Window based on contents
Asked Answered
A

1

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

Alkaline answered 25/5, 2012 at 14:14 Comment(0)
A
6

I missed the AutoSize property... Works as expected

window.setAutoSize(true);
Alkaline answered 25/5, 2012 at 14:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.