What is the correct way to center content as a popup in the middle of the 
page?

I am asking this because if I use  GWT PopupPanel.center() method, it will 
not correctly center it's content, however the top left corner will be in 
the center of the page ;)..

If however, I overrridde the PopupPanel.center() method, such that it 
performs first the show() action and then the center code in a Deferred 
Command, it will be correctly centered.

I think this is because of the dimensions that are correctly calculated by 
the browser at the end current call stack (when it's attached to the root 
panel), such that you have to center it in the deferred command...
Is this so? 
What is the correct way to center something in the middle of the page?
And why does GWT not center the content in a deferred way?

I prefer not to use the deferred way as in the past it gave me some 
problems when in the meantime something happens, like the content was 
removed/changed such that you have to build all kind of guards to check 
this :(...

- Ed

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


Reply via email to