To resize or to not resize a layout

78 views
Skip to first unread message

Antoine Lever

unread,
Sep 19, 2012, 7:11:31 AM9/19/12
to google-we...@googlegroups.com
I'm using a split layout panel to add a west and north panel.  But, I only want the west panel to resize and NOT the north.  Any ideas?

Thanks in advance. 

Thomas Broyer

unread,
Sep 19, 2012, 8:42:05 AM9/19/12
to google-we...@googlegroups.com

On Wednesday, September 19, 2012 1:11:31 PM UTC+2, Antoine Lever wrote:
I'm using a split layout panel to add a west and north panel.  But, I only want the west panel to resize and NOT the north.  Any ideas?

Use a DockLayoutPanel for the north/center non-resizeable separation and a SplitLayoutPanel for the west/center resizeable split.

Antoine Lever

unread,
Sep 19, 2012, 10:55:33 AM9/19/12
to google-we...@googlegroups.com
How do you do that? I was under the impression that you could only add one layoutPanel via RootLayoutPanel.get().  Would you have a code fragment I can look at - thank you very much.

Thomas Broyer

unread,
Sep 19, 2012, 11:16:17 AM9/19/12
to google-we...@googlegroups.com


On Wednesday, September 19, 2012 4:55:33 PM UTC+2, Antoine Lever wrote:
How do you do that? I was under the impression that you could only add one layoutPanel via RootLayoutPanel.get().

The only constraint is that you add RequiresResize widgets to ProvidesResize widgets. RootLayoutPanel is a ProvidesResize, and all layout panels implement both interfaces (and, for instance, DataGrid is a RequiresResize but not a ProvidesResize, as it's not a container). If you break that ProvidesResize/RequiresResize chain, you have to explicit set the dimensions of the RequiresResize widget.
See https://developers.google.com/web-toolkit/doc/latest/DevGuideUiPanels#Resize (and also search for “Using a LayoutPanel without RootLayoutPanel” in that same page)

Jens

unread,
Sep 19, 2012, 11:16:46 AM9/19/12
to google-we...@googlegroups.com

How do you do that? I was under the impression that you could only add one layoutPanel via RootLayoutPanel.get().  Would you have a code fragment I can look at - thank you very much.

It's like:

RootLayoutPanel
--> DockLayoutPanel
     --> NORTH: header
     --> CENTER: SplitLayoutPanel
          --> WEST: side menu
          --> CENTER: content area

-- J.

Antoine Lever

unread,
Sep 19, 2012, 11:18:11 AM9/19/12
to google-we...@googlegroups.com
It works perfectly!  Thank you!
Reply all
Reply to author
Forward
0 new messages