|
Re: event when item is visible, and getOffsetHeight isn't 0: msg#02146GoogleWebToolkit
try the onLoad() method: /** * This method is called immediately after a widget becomes attached to the * browser's document. */ protected void onLoad() { } //Adam On 30 Juli, 22:10, bradr <brad.rydzew...@xxxxxxxxx> wrote: > I'm working on a widget and need to do calculations based on it's > height in order to layout its child components. So i do something like > this: > > @Override > public void setHeight(String height) { > > super.setHeight(height); > ...do height calculations > > } > > The problem i'm having is that setHeight is called before the widget > is visible on the screen, and therefore, I can't do the calculation > because getOffsetHeight is equal to zero. > > Is there a method I can override or an event I can subscribe to that > tells me when the widget is visible and has been laid out on the > screen, at which point i could run the calculation? --~--~---------~--~----~------------~-------~--~----~ 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@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to Google-Web-Toolkit+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
|
|
||||||||||||||||||||||||||
| News | Mail Home | sitemap | FAQ | advertise |