Hi group,

I have started writing the layout code using the onresize event, and I
think this will be the solution I wanted. I created a class "Display",
derived from LayoutPanel,.

But I am still missing information to layout my widgets. It is not
that easy to geht width and height, als mentioned above.

For example,. to resize my MenuBar, I need its natural height, i. e.
the height it needs to show its content.
Then I would resize it to (<window width>,<natural height>).

When I create it and add it to my LayourtPanel, it's immediately
resized to fill the whole window.
After that, getOffsetHeight returns not the desired result.

I also tried to save the height immediately after creation and before
adding it to the panel:

MenuBar menubar = new MenuBar ();
...
int menuHeight = menubar.getOffsetHeight (); // will be 0
add (menubar);
But it returns 0.

So I need a method to get the size a widget needs *independently* of
its current size.

Or how would you resize the menubar?

Thanks
Magnus

On 9 Jun., 15:35, Ian Bambury <ianbamb...@gmail.com> wrote:
> > But how do I get the Resize-Event if I don't subclass an existing
> > layout panel?
>
> Window.addResizeHandler(handler);

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to