GWT 100%高度的面板与滚动 [英] GWT 100% height panel with scroll
问题描述
我需要一个主面板:
-
填充所有浏览器空间(100%高度);
-
如果太多折叠显示滚动条(自动滚动) 。
当我使用旧的布局(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:
fills all the browser space (100% height);
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屋!