Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    WidgetCanvas in SectionStackSection not sized correctly.

    We have a GWT Composite widget(SchedulerWidget ) which is placed in an SGWT WidgetCanvas. The widget size off the WidgetCanvas.

    When the WidgetCanvas is placed in a SectionStackSection it does not size correctly on the HTML DOM level. It "bleeds" out of the window in the inspector.
    The WidgetCanvas is the same size as the container pane the SectionStack is in, but is shifted 26 px down. Which causes the widget to get cut off.
    The header which we are using for the title and contols is 26 px in height. It appears after the content in HTML DOM.

    When the WidgetCanvas is placed in a VLayout the widget canvas is sized correctly as there is no header. (6B)

    When the WidgetCanvas is placed in a VLayout then placed in the SectionStackSection the sizing is also incorrect.
    The VLayout doesn't "bleed" out of the window in the inspector, but the WidgetCanvas still does.

    Attached is screen shots showing the FF inspector, the inspected layout, and the SGWT Watch.
    In the shown case the Schedule is in a SGWT Window.
    It is also used in a Window/VLayout where it is the last member and bleeds there as well.

    It seems to be an issue with the WidgetCanvas.

    1. SmartClient Version: v11.0p_2016-06-15/PowerEdition Deployment (built 2016-06-15) 2. FF 33.0 & 47.0
    3 & 4 & 5
    6A.

    public class Schedule extends SectionStack {
    private SchedulerWidget scheduler;
    private WidgetCanvas layout = null;

    public Schedule() {
    setOverflow(Overflow.HIDDEN);
    setRedrawOnResize(false);
    setWidth100();
    setHeight100();
    SectionStackSection section = new SectionStackSection("Title");
    section.setCanCollapse(false);
    section.setControls(buildButton());
    setSections(section);

    scheduler = new SchedulerWidget(data);
    scheduler.setSize("100%", "100%");
    layout = new WidgetCanvas(scheduler);
    layout.setOverflow(Overflow.VISIBLE);
    layout.setHeight100();
    layout.setWidth100();
    section.setItems(layout);
    }
    }


    6B.

    public class Schedule extends VLayout{

    private SchedulerWidget scheduler;
    private WidgetCanvas layout = null;

    public Schedule(Canvas parent) {
    this.parent = parent;
    setOverflow(Overflow.HIDDEN);
    setRedrawOnResize(false);
    setWidth100();
    setHeight100();

    scheduler = new SchedulerWidget(data);
    scheduler.setSize("100%", "100%");
    layout = new WidgetCanvas(scheduler);
    layout.setOverflow(Overflow.VISIBLE);
    layout.setHeight100();
    layout.setWidth100();
    setMembers(layout);
    }
    }

    6C.

    public class Schedule extends SectionStack {
    private SchedulerWidget scheduler;
    private WidgetCanvas layout = null;

    public Schedule() {
    setOverflow(Overflow.HIDDEN);
    setRedrawOnResize(false);
    setWidth100();
    setHeight100();
    SectionStackSection section = new SectionStackSection("Title");
    section.setCanCollapse(false);
    section.setControls(buildButton());
    setSections(section);

    scheduler = new SchedulerWidget(data);
    scheduler.setSize("100%", "100%");
    layout = new WidgetCanvas(scheduler);
    layout.setOverflow(Overflow.VISIBLE);
    layout.setHeight100();
    layout.setWidth100();
    VLayout layout2 = new VLayout();
    layout2.addMember(layout);
    section.setItems(layout2);
    }
    }


    Attached Files

    #2
    We can't really tell what's happening here because we don't have the code or any sample HTML for your Scheduler, but basically, since you've set overflow:visible, you are asking us to detect the size of the HTML that the Scheduler draws, and something is going wrong in that process.

    A couple of specific things could be happening:

    1. The Scheduler could be modifying it's DOM on the fly after initial draw. If so, there's no way for us to reliably automatically detect this, but you can call adjustForContent() to have us re-measure.

    2. Something in the Scheduler HTML may be triggering a Firefox bug where sizes are misreported. We can't look into this without at least a sample of the contained HTML which reproduces the problem, preferably a simplified one.

    Comment

    Working...
    X