I'm trying to create a simple page example with a menu bar on top and a BorderLayoutContainter on the bottom. I cannot figure out how to get the bottom part automatically fit into the size left over.
I have something like this:
public void onModuleLoad() {
MenuBar mbar = new MenuBar();
// Add menus...
BorderLayoutContainer blc = new BorderLayoutContainer();
// Create borderlayout parts...
NorthSouthContainer mainCon = new NorthSouthContainer();
mainCon.addNorthWidget(mbar);
mainCon.addSouthWidget(blc);
ViewPort vp = new ViewPort();
vp.add(mainCon);
RootPanel.get().add(vp);
}
The menu bar display properly but the bottom - the BorderLayoutContainer - is completely squashed. If I just add the BorderLayoutContainer to the ViewPort, it displays properly, i.e. fills the entire screen.
Why is the size not getting passed from the NorthSouthContainer's south part to the BorderLayoutContainer. Or is there something else going on?
I had the same issue some weeks ago. It seems to be a bug in GXT where at someplace the widgets' css is not correctly
ensureInjected(). As you know, your north- and southwidget take their height attribute from the parent container. You could avoid this error by passing style-attributes to the inner widgets like so:Of course I know this is not a really clean solution but it is a possibility. If you want full access to the solution, you need to implement your own appearance to the BorderLayoutContainer. Phew...