Question

I am facing a little issue when using BorderLayoutContainer in my App.

I just want to have a center panel and south panel but I get a strange blue margin around my south panel (see the image below).

enter image description here

Find my sources below.

private Widget getContainer() {
    SimpleContainer sc = new SimpleContainer();
    BorderLayoutContainer blc = new BorderLayoutContainer();

    ContentPanel validationView = new ContentPanel();
    validationView.setHeadingText("Validation");

    ContentPanel center = new ContentPanel();
    center.add(editorMVP.getDisplay());
    center.setHeaderVisible(false);
    center.setBorders(false);
    blc.setCenterWidget(center);

    BorderLayoutData southData = new BorderLayoutData(250);
    southData.setCollapsible(true);
    southData.setSplit(true);
    southData.setCollapsed(true);

    blc.setSouthWidget(validationView, southData);

    blc.collapse(LayoutRegion.SOUTH);

    sc.add(blc);

    return sc;
}

Can anybody help me solve this please?

EDIT: I have been able to remove this margin with using a SimpleContainer instead of a ContentPanel. But I have now a blue background I want to get rid off. Any idea?

private Widget getContainer() {
    SimpleContainer sc = new SimpleContainer();
    BorderLayoutContainer blc = new BorderLayoutContainer();

    ContentPanel validationView = new ContentPanel();
    validationView.setHeadingText("Validation");

    SimpleContainer center = new SimpleContainer();
    center.add(editorMVP.getDisplay());

    blc.setCenterWidget(center);

    BorderLayoutData southData = new BorderLayoutData(250);
    southData.setCollapsible(true);
    southData.setSplit(false);
    southData.setCollapsed(true);

    blc.setSouthWidget(validationView, southData);

    blc.collapse(LayoutRegion.SOUTH);

    sc.add(blc);

    return sc.asWidget();
}

enter image description here

Thank you for your help.

Was it helpful?

Solution

The issue solves itself after I rewrote my code. Here is my final code, but I don't think it has really changed... Don't really understand what happened...

private Widget getContainer() {
        SimpleContainer sc = new SimpleContainer();
        BorderLayoutContainer blc = new BorderLayoutContainer();

        ContentPanel validationView = new ContentPanel();
        validationView.setHeadingText("Validation");

        ContentPanel center = new ContentPanel();
        center.setHeaderVisible(false);
        center.add(editorMVP.getDisplay());

        blc.setCenterWidget(center);

        BorderLayoutData southData = new BorderLayoutData(250);
        southData.setCollapsible(true);
        southData.setSplit(false);
        southData.setCollapsed(true);

        blc.setSouthWidget(validationView, southData);

        blc.collapse(LayoutRegion.SOUTH);

        sc.add(blc);

        return sc.asWidget();
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top