logo       

event when item is visible, and getOffsetHeight isn't 0: msg#02141

GoogleWebToolkit

Subject: event when item is visible, and getOffsetHeight isn't 0


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

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise