Wednesday, November 30, 2011

Re: getOffsetHeight returns 0 although onload has been called

The problem is that I call getOffsetHeight/Width on a panel which belongs to a widget which has display property set to none. The display property is set to none because that widget is not currently displayed by the decklayoutpanel but it is attached to it, which is the desired behaviour.  

I am using firebug and chrome dev tools extensively. To use those tools, that means that your view is layed out in the browser so everything is fine. 

The DeckLayoutPanel sets disiplay: none to all its children apart from the one currently being displayed. I tried, to postpone the call to getOffsetHeight after deckLayoutPanel.setWidget(widget) but still returned 0.

Thanks, 
G << pulls his hair :( 
-- "Please consider the environment before printing this e-mail"   The Newspaper Marketing Agency: Opening Up Newspapers:   http://www.nmauk.co.uk/   This e-mail and any attachments are confidential, may be legally privileged and are the property of NI Group  Limited (which is the holding company for the News International group, is registered in England under number 81701 and whose registered office is 3 Thomas More Square,  London E98 1XY, VAT number GB 243 8054 69),  on whose systems they were generated.  If you have received this e-mail in error, please notify  the sender immediately and do not use, distribute, store  or copy it in any way.  Statements or opinions in this e-mail or any attachment  are those of the author and are not necessarily agreed  or authorised by NI Group Limited or any member of its  group.  NI Group Limited may monitor outgoing or incoming  emails as permitted by law. It accepts no liability  for viruses introduced by this e-mail or attachments.  

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

No comments:

Post a Comment