I'm trying to center an element that contains a CellTable. The actual centering logic works okay, but I'm having problems with all those attaching/detaching events. Basically, I'm doing this in my container widget:

  @Override
  public void onLoad() {
    super.onLoad();
    center();
  }

However, it seems that `onLoad` on the container does not mean that all children have loaded, so... the actual centering routine is called to early and Element.getOffsetWidth/getOffsetHeight are both returning 0. This results in the container being displayed with the left upper corner in the center of the screen.

Same thing happens if I use an AttachEvent.Handler on the CellTable.

So... is there any event on CellTable, or on Widget or whatever that allows me to trigger an action when the DOM subtree has been attached to the DOM?

Thanks in advance.

--
Ionuț G. Stan  |  http://igstan.ro

--
You received this message because you are subscribed to the Google Groups "Google 
Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to