Wednesday, April 23, 2014

Re: DockLayoutPanel as root with fixed width

I see such sites very often: a fixed-width layout but with still some content in the remaining space.

So the root layout panel should cover the whole viewport.

I don't get it. What remaining space do you mean and why should something fill the whole viewport in a fixed-width layout? In a fixed-width layout the whole point is that your page has a defined width, which in most cases is 960px, and possible remaining space left and right of that 960px page is intentionally empty so that users don't have to scroll horizontally if they use a small screen, e.g. 1024x768. 

So maybe you don't mean a fixed-width layout? If you really meant it then your outer most container should have a fixed width, which in case of GWT would be the container widget you put into the RootPanel (which represents the <body> tag). In case of RootLayoutPanel it would be the RootLayoutPanel itself, as it puts itself into the RootPanel behind the scenes.

So you either have

FlowPanel fixedWidthPage = new FlowPanel(); // or any other widget


DockLayoutPanel page = new DockLayoutPanel(); // or any other layout widget
RootLayoutPanel fixedWidthRootLayoutPanel = RootLayoutPanel.get();

-- J.

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

No comments:

Post a Comment