How do I make an instance of gwtext.client.widgets.Window appear at specific DIV in my html ? I tried window.anchorTo(DOM.getElementById("Some_Div"),"left", new int[]{0,0}), thinking the window will anchor itself to div id="Some_Div" in my html. it didnt.
+1
A:
I haven't used the gwt-ext library in a couple of months, but you might want to try this if you haven't already. It should attach the widget where you want it. That said, there are some cases where the gwt-ext widgets react in ways that are not intuitive to someone who really understands the normal GWT widgets.
RootPanel.get("Some_Div_Id").add( someWidget )
bikesandcode
2008-11-26 13:57:57
A:
You should use
window.alignTo(DOM.getElementById("Some_Div"),"tl-tl", new int[]{0,0});
for positioning the window's top left to Some_Div's top left corner.
These are the valid strings for 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
Refer the Ext documentation for detailed explanation.
sarav
2008-12-08 06:55:42