Wednesday, November 30, 2011

Re: getOffsetHeight returns 0 although onload has been called

You don't need getOffsetHeight to achieve what you want. There are two

1. Use LayoutPanel instead of DockLayoutPanel. LayoutPanel allows you
to add two widgets that occupy the same space. If you don't specify
the position of each child widget, each child widget will occupy the
entire space available. From this moment all you need to do is hide
one of them depending on where users clicks.

2. When necessary, detach one widget and attach the other one. In each
case these widgets should pick up their size automatically from their
parent widget - there is no need to set their size explicitly as long
as you use widgets that support resize.

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment