Vaadin: spacing with vertical scrollbar -


environment:

  • vaadin 7.6.2
  • no custom css rules far besides headline
  • default theme in place: 'valo'.

in nutshell

i have trouble spacing while showing vertical scroll bars. let me show pictures demonstrate problem:

enter image description hereenter image description here

correct on left, incorrect on right.

description

when no scroll bars shown, spacing (padding) shown correctly on left on right side horizontally (refer red boxes). scroll bar gets visible, spacing on right between combobox , scrollbar seems gone (refer red strokes on left in each picture measurement line).

however, if add margin (right) on gridlayout containing combobox, margin stays , behaves expected when scroll bars appears.

details

the setup of single components involved follows:

 --- panel rightsection ------------------------- |                                                | |  --- verticallayout componentcontainer ------  | | |                                            | | | |  --- customcomponent componentwrapper ---  | | | | |                                        | | | | | |  --- gridlayout grid ----------------  | | | | | | |                                    | | | | | | | |  --- label headline -------------  | | | | | | | | |                                | | | | | | | | |  --------------------------------  | | | | | | | |                                    | | | | | | | |  --- combobox combobox ----------  | | | | | | | | |                                | | | | | | | | |  --------------------------------  | | | | | | | |                                    | | | | 

the crucial settings following:

rightsection.setsizefull(); // panel componentcontainer.setsizefull(); // verticallayout // customcomponent being able show vertical scrollbars //   there component @ bottom of  //   componentcontainer has  //   excluded of vertical scrollbars // therefore, in constructor customcomponent(component content) {   addstylename("v-scrollable");   setcompositionroot(content);   setheight(100, unit.percentage);   setwidth(100, unit.percentage);   content.setsizeundefined();   content.setwidth(100, unit.percentage); }  // make customcomponent take full space inside parent componentcontainer.setexpandratio(componentwrapper, 1);  headline.setwidth(100, unit.percentage); combobox.setwidth(100, unit.percentage); 

finally

how preserve space between components inside gridlayout , vertical scrollbars (if present)?

as time, hint appreciated :)

cheers, bully


Comments