tags:

views:

401

answers:

0

I have this code which sets up a "main" container into which other modules of the application will go.

    LayoutContainer c = new LayoutContainer();
    c.setScrollMode(Scroll.ALWAYS);
    parentContainer.add(c, <...>);

Then later on, I have the following as an event handler

    pContainer = c; // pContainer is actually a parameter, but it has c's value

    pContainer.removeAll();
    pContainer.setLayout(new FitLayout());

    LayoutContainer wrapperContainer = new LayoutContainer();
    wrapperContainer.setLayout(new BorderLayout());
    wrapperContainer.setBorders(false);
    pContainer.add(wrapperContainer);

    LayoutContainer west = pWestContentContainer;

    BorderLayoutData westLayoutData = new BorderLayoutData(LayoutRegion.WEST);
    westLayoutData.setSize(pWidth);
    westLayoutData.setSplit(true);
    wrapperContainer.add(west, westLayoutData);

    LayoutContainer center = new LayoutContainer();
    wrapperContainer.add(center, new BorderLayoutData(LayoutRegion.CENTER));

    pCallback.withSplitContainer(center);
    pContainer.layout();

So in effect, the container called 'west' here will be where the module's UI gets displayed. That module UI then does a simple rowlayout with two children. The botton child has RowData(1, 1) so it fills up all the available space.

My problem is that the c (parent) container reports a height and width value which includes the value underneath the scrollbars. What I would like is that the scrollbars show all the space excluding their own space.

This is a screenshot showing what I mean: alt text