GWT: How to add DockLayoutPanel inside another panel? Not the RootLayoutPanel

别来无恙 提交于 2020-01-03 19:05:17

问题


Is it possible to add DockLayoutPanel inside another panel other than the RootLayoutPanel? If so, how would you do it? I attempted to add it inside HTMLPanel, and only north of the DockLayoutPanel shows. Then I tried it inside LayoutPanel, it failed again.

I thought it would have work for LayoutPanel because RootLayoutPanel is a subclass of LayoutPanel.

Any answers welcome. Thanks,


回答1:


DockLayoutPanel is a RequiresResize widget, so either you put it inside a ProvidesResize widget (any so called layout panel) or you give it an explicit size.

See the Using a LayoutPanel without RootLayoutPanel section in http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#Recipes



来源:https://stackoverflow.com/questions/8779913/gwt-how-to-add-docklayoutpanel-inside-another-panel-not-the-rootlayoutpanel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!