问题
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