Note that there are some explanatory texts on larger screens.

plurals
  1. POWrong calculation of scrollbars and margins (GWT, GXT)
    text
    copied!<p>i want to have a panel with a fixed width in a centerlayoutcontainer. And the centerlayoutcontainer should have scrollbars so, that the panel is always completely visible. Around the panel there should be 20px margins, so that there is a little space around the fixed panel. I can't get this work because the scrollbars aren't calculated correctly. Look at my example. If you change the height of the dialog so that the fixed panel is bigger than the dialog, the left side of the fixed panel ist gone and not visible anymore.</p> <p>Is this a bug? Can you give me an advise how i can get this work?</p> <p>I am using gwt 2.5.1 and gxt 3.0.6. The issue is reproduceable in every browser.</p> <pre><code>final Dialog dialog = new Dialog(); dialog.setMaximizable(true); final BorderLayoutData eastData = new BorderLayoutData(170); eastData.setMargins(new Margins(0, 0, 0, 5)); eastData.setCollapsible(true); final MarginData centerData = new MarginData(); final BorderLayoutContainer blcContent = new BorderLayoutContainer(); blcContent.setBorders(true); final VerticalLayoutContainer vlcCenter = new VerticalLayoutContainer(); vlcCenter.setScrollMode(ScrollMode.AUTO); final CenterLayoutContainer clcCenter = new CenterLayoutContainer(); final SimpleContainer con = new SimpleContainer(); con.setPixelSize(1322, 762); final ContentPanel cpCenter = new ContentPanel(); cpCenter.setHeadingHtml("Center"); cpCenter.setPixelSize(1282, 722); con.add(cpCenter, new MarginData(20)); clcCenter.add(con); vlcCenter.add(clcCenter, new VerticalLayoutData(1, 1)); final ContentPanel cpEast = new ContentPanel(); cpEast.setHeadingHtml("East"); blcContent.setEastWidget(cpEast, eastData); blcContent.setCenterWidget(vlcCenter, centerData); dialog.add(blcContent); dialog.setPixelSize(Window.getClientWidth() - 100, Window.getClientHeight() - 100); dialog.show(); Window.addResizeHandler(new ResizeHandler() { @Override public void onResize(ResizeEvent event) { if (dialog.isMaximized()) { dialog.setPixelSize(Window.getClientWidth(), Window.getClientHeight()); } else { dialog.setPixelSize(Window.getClientWidth() - 100, Window.getClientHeight() - 100); } } }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload