Sunday, May 30, 2010

Re: how to center a panel within another panel?

I suggest you to re-think the use CellPanels (this includes VerticalPanel, HorizontalPanel and almost every gwt Panel) to create the layout. They end up being html tables and normally you don't want that. The cleanest approach I found was to use only FlowPanels each one with their ID and then use CSS to do the layout.

I hope it helped you

2010/5/29 kozura <kozura@gmail.com>
You can place equal sized panels in the left/right (and/or top/bottom,
not sure how you're trying to center) of the DockLayoutPanel, before
adding the center panel.  The center panel will then be centered
between them.  But note with the layout panel methodology, the center
panel will take the full remaining width (height).  It won't take a
widget and center it based on the size of its contents.

On May 28, 12:22 pm, Magnus <alpineblas...@googlemail.com> wrote:
> Hi,
>
> I use DockLayoutPanel as the RootPanel for my browser window. And I
> want to place another "child" panel within the dockpanels center.
>
> Well, the child panel is always aligned to the upper left.
>
> How can I achieve that:
>
> a) the DockLayoutPanel really covers the whole browser window
> b) the child panel is centered within the DockLayoutPanel's center
> (but not resized)
>
> Thank you
> Magnus

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

No comments:

Post a Comment