GWT 100% height bar with scroll

Can someone help me make a normal layout in GWT.

I need a main panel that:

  • fills the entire browser space (100% height);

  • if you collapse too much, the scroll bar is displayed (autoscroll).

When I use the old layout (RootPanel, VerticalPanel), I have a scroll but cannot get 100% height.

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

Is there a sample showing how to achieve both goals?

Thanks in advance!

+4
source share
2 answers

I have it like a RootLayoutPanel with a DockLayoutPanel inside. In the center is the ScrollPanel, which takes up the rest of the space and provides scrolling if necessary. My .ui.xml (UIBinder stuff) looks something 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> 
+6
source

Here is what I would like to try:

  • Your first panel (except the root) is ScrollPanel
  • Your second panel will be your LayoutPanel (or DockLayoutPanel if you prefer).
0
source

Source: https://habr.com/ru/post/1312425/


All Articles