Hi,

I was trying to initialize my canvas side depending on the size of the
scroll panel that contains it and I made several tries. As I could
see, getOffsetWidth returns always 0 if it is invoked inside
EntryPoint.onModuleLoad() so I looked for a solution.

First I found that by the end of Widget.onLoad()/Widget.onAttach()
should return the correct value (http://code.google.com/p/google-web-
toolkit/issues/detail?id=4106) but it didn't work.

I kept looking and tried using DeferredCommand (now Scheduler) inside
Widget.onLoad() and it worked for me. I do overwriting the root panel
child's onLoad method. I found this solution at:
http://code.google.com/p/google-web-toolkit/issues/detail?id=1243. But
I don't know if this it is a final solution.

So I would like to ask the following questions:

Will this solution always work or it depends on the moment that the
command is executed or the browser?

Is there another solution for obtaining offsetWidth real value before
user starts interacting with the application?

Thanks in advance,

Jorge

-- 
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