GWT 100%高度的面板与滚动 [英] GWT 100% height panel with scroll

查看:106
本文介绍了GWT 100%高度的面板与滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要一个主面板:


  1. 填充所有浏览器空间(100%高度);

  2. 如果太多折叠显示滚动条(自动滚动) 。

当我使用旧的布局(RootPanel,VerticalPanel)时,我有滚动,但无法获得100%的高度。

当我使用新的布局(RootLayoutPanel,DockLayoutPanel)时,我获得了100%的高度,但我没有得到任何滚动。还有我在IE中遇到了麻烦。



是否有示例显示如何实现这两个目标?感谢您!

解决方案

我已经将此作为一个带有DockLayoutPanel的RootLayoutPanel。中间是一个ScrollPanel,它占据了剩余的空间,并在需要时提供滚动。我的.ui.xml(UIBinder的东东)看起来就像这样:

 < g:DockLayoutPanel unit =PXui :字段= 码头 > 
<! - g:北部,西部,东部,南部的人到这里 - >
< g:ScrollPanel addStyleNames ='{style.document_area}'>
< / g:ScrollPanel>
< / g:center>
< / g:DockLayoutPanel>


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!

解决方案

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>

这篇关于GWT 100%高度的面板与滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆