Gwt-ext window positioning

How do I instantiate gwtext.client.widgets.Window appear in a specific DIV in my html? I tried window.anchorTo (DOM.getElementById ("Some_Div"), "left", new int [] {0,0}) thinking that the window would be anchored to div id = "Some_Div" in my html. he didn't.

+1


source to share


2 answers


I haven't used the gwt-ext library in a couple of months, but you can try this if you haven't already. It should attach the widget you want it to. However, there are some cases where gwt-ext widgets react in a way that is not intuitive for those who really understand regular GWT widgets.



RootPanel.get("Some_Div_Id").add( someWidget )

      

+1


source


You must use

window.alignTo(DOM.getElementById("Some_Div"),"tl-tl", new int[]{0,0});

      

to position the top left window at the top left corner of Some_Div.



These are the correct lines for the position argument:

Value  Description
-----  -----------------------------
tl     The top left corner (default)
t      The center of the top edge
tr     The top right corner
l      The center of the left edge
c      In the center of the element
r      The center of the right edge
bl     The bottom left corner
b      The center of the bottom edge
br     The bottom right corner

      

See Ext documentation for details.

0


source







All Articles