On Sep 21, 5:21 pm, Gal Dolber <gal.dol...@gmail.com> wrote:
> try with onAttach()

The method onLoad is called by onAttach so overiding onAttach won't
change anything not to mention the fact that the doc for onAttach says
"It is strongly recommended that you override {...@link #onLoad()} or
{...@link #doAttachChildren()} instead of this method".

On Sep 21, 5:35 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
> How about implementing RequiresResize and doing the job in onResize()?

That doesn't help because onResize isn't called automatically when the
widgets are initially constructed, only when a browser initiates a
resize event.  However I have tried exactly what you suggest by
putting the code I am having trouble with in a RequiresResize.onResize
method and am calling that method in onLoad (so the sizing happens on
both resize and when the widget is initially created).  The method
getOffsetWidth still returns 0.  I also tried manually calling
onResize on the RootLayoutPanel at the end of my onModuleLoad with the
same result.  Only a DeferredCommand seems to result in getOffsetWidth
not returning 0.

-- 
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-tool...@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