I want to create a wizzard like modal window, containing contents of different sizes, e.g. small buttons or bigger embedded browsers.
My modal window shall adapt the size of its childs automatically but I’m not able to get this to work. I already read the
forums and stumpled on the setSizeUndifined() method but still no success.
The relevant code looks like this:
getWindow().removeAllComponents();
getWindow().getContent().setSizeUndefined();
Label label = new Label("Loooooooooooooooooooooooong Laaaaaaaaaaaabel!");
label.setSizeUndefined();
getWindow().addComponent(label);
Is there a way to do the autoresizing stuff on the embedded browser too? A html page has no size like an image file, so it would be hard to get the “size” of the page, I want to embed, right?
What do you mean with the embedded browser? Usually you shouldn’t touch the user’s browser’s size; but it is probably something else that you mean when you said ‘embedded’.
Ah yes! Yeah if it is plain html page, then I don’t really know where it would fetch a size from, and even if it could, what would the correct size be? plain html is basically viewable in any size, if not some HEIGHT/WIDTH/css parameters override that.