tags:

views:

174

answers:

2

Hello!

Could anyone help me make normal layout in GWT.

I need a main panel which:

  1. fills all the browser space (100% height);

  2. if being collapsed too much shows scroll bars (autoscroll).

When I use old layout (RootPanel, VerticalPanel) I have scroll, but can't get 100% height.

When I use new layout (RootLayoutPanel, DockLayoutPanel) I get 100% height, but I don't get any scroll. And also I have some troubles in IE.

Is there any sample showing how to achieve both goals?

Thanks in advance!

A: 

This is what I would try :

  1. Your first panel (except the root) is a ScrollPanel
  2. Your second panel would be your LayoutPanel (or DockLayoutPanel if you prefer).
Zwik
+1  A: 

I've got this as a RootLayoutPanel with a DockLayoutPanel inside. In the center is a ScrollPanel that takes up the rest of the space and provides the scrolling if needed. My .ui.xml (UIBinder stuff) looks kind of like this:

<g:DockLayoutPanel unit="PX" ui:field="Dock">
            <!-- the g: north, west, east, south guys go here -->
    <g:center>
    <g:ScrollPanel addStyleNames='{style.document_area}'>
    </g:ScrollPanel>
    </g:center>
</g:DockLayoutPanel>
eb1