VerticalLC should behave with a BorderLC in it, provided you give the BorderLC a size - what VerticalLayoutData did you assign when you added it?
Code:
public class Test implements EntryPoint {
public void onModuleLoad() {
//Only make one viewport, that gets added to the root panel
Viewport root = new Viewport();
//First, the outer wrapper:
VerticalLayoutContainer outer = new VerticalLayoutContainer();
//Header section can go in here - take all width available (i.e. 1.0), and only height required(i.e. -1):
outer.add(new Label("Replace with real header"), new VerticalLayoutData(1.0, -1));
BorderLayoutContainer border = new BorderLayoutContainer();
//add content to the border LC...
border.setNorthWidget(createContentPanel("North"));
border.setSouthWidget(createContentPanel("South"));
border.setEastWidget(createContentPanel("East"));
border.setCenterWidget(createContentPanel("Center"));
//Add the BorderLC with both height/width as 1.0 to use all remaining space:
outer.add(border, new VerticalLayoutData(1.0,1.0));
root.setWidget(outer);
RootPanel.get().add(root);
}
private ContentPanel createContentPanel(String heading) {
ContentPanel panel = new ContentPanel();
panel.setHeadingText(heading);
panel.setWidget(new Label(heading + " content goes here"));
return panel;
}
}