Hi,

To be clear: What are you expecting to have in your layout scenario? i.e. A
menu on top, a Chess Widget centered in the browser with same margins from
top/left/right/bottoms? Also, the chess Widget should have 64 cells of the
same height/width.? i.e. the cell doesn't change if the browser resize?


On Wed, Jun 9, 2010 at 11:20 AM, Magnus <alpineblas...@googlemail.com>wrote:

> 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<google-web-toolkit%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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