1

I am working on a project that uses Google Web Toolkit (GWT). I am using a dock layout panel to layout a webpage. In the CENTER, I have a flow panel that adds a set of children with different sizes. When the number of widgets becomes large, then CENTER panel doesn't re-size to include these new widgets. How can I make the dock layout panel resize the center panel so that all the children widgets of the flow panel in the center panel are all shown clearly? I would greatly appreciate it if anyone could provide some information on this. I know that the dock layout panel uses absolute positioning but the flow panel I have is set to dynamically resize when the flow panel has multiple widgets.

Thanks,

MPH

4

2 回答 2

1

在 rootlayout 面板 den 上添加 docklayout 面板,它将正确调整大小:

DockLayoutPanel p = new DockLayoutPanel(Unit.EM);

/*添加NSEW组件*/

RootLayoutPanel rp = RootLayoutPanel.get();

rp.add(p);

希望这对你有用。

于 2012-04-10T07:12:08.153 回答
1

GWT***LayoutPanel小部件的目的是在每个浏览器中提供可预测的、像素完美的布局,因此 DockLayoutPanel 无法调整其中心组件的大小。您的 N、S、E、W 组件具有固定大小。您如何期望 DockLayoutPanel 保持这些组件大小调整中心组件的大小以适应内部不断增长的内容?

于 2012-04-10T01:18:38.650 回答