问题描述
我正在尝试在我的应用程序中插入一个 gwt 数据网格.如果我设置一个静态高度(500 像素),一切都很好.但我想让 dataGrid 自动调整到屏幕大小.高度为 100% 我得到一个空白屏幕.我还尝试将数据网格放入具有相同结果的 resizeLayoutPanel 中.
I'm trying to insert a gwt datagrid in my application. If i set a static height (500px) everything works nice. But i want to make the dataGrid auto adjust to screen size. With height 100% i get a blank screen.i've also tried to put the datagrid into a resizeLayoutPanel with the same results.
有什么建议吗?
推荐答案
所有 RequiresResize
小部件都应该指定一个明确的大小,或者添加到 ProvidesResize
小部件(最多具有显式大小的 RootLayoutPanel
或 ProvidesResize
小部件;唯一的例外是未实现 ProvidesResize
的 ResizeLayoutPanel
因为它无法兑现其页眉和页脚小部件的合同,但它绝对兑现了中心小部件的合同).
All RequiresResize
widgets should be given an explicit size, or be added to ProvidesResize
widgets (up to a RootLayoutPanel
or a ProvidesResize
widget with an explicit size; the only exception is ResizeLayoutPanel
which doesn't implement ProvidesResize
because it couldn't honor the contract for its header and footer widgets, but it definitely honors it for the center widget).
那么问题是:你在哪里添加了 DataGrid
和/或 ResizeLayoutPanel
?
So the question is: where did you add your DataGrid
and/or ResizeLayoutPanel
?
这篇关于GWT DataGrid 自动高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!