Hi Jean-Baptiste,
Jean-Baptiste BRIAUD - Novlog wrote:
> Hi,
>
> I can read that in the window example in the demo :
> win.open();
> this.getRoot().add(win, {left:20, top:20});
>
> When I try it on my code, the window appears at win.open() even if I
> commented the second line.
>
> So my question is : how a widget (here the window) can be rendered
> outside a container ?
The answer is that each window at its creation is automatically added to
the application root. At the second line the the interesting part is
"{left: 20, top:20}". The window is already added and the second does
only some positioning.
You can also write
--snip--
win.open();
win.setLayoutProperties({ top:20, left:20 });
--snip--
to achieve the same result.
> Why does it work to comment the second line ?
As the window widget is already added to the application root is gets
positioned at the default values (top=0 and left=0).
cheers,
Alex
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel