View Full Version : Scrollbar in nested Layouts/Panels

28 Nov 2011, 5:15 AM
I am currently having trouble to make a nested panel with vbox layout scrollable. The vbox layout panel can have a dynamic number of grids in it with a dynamic number of records.

Here is my pseudo code

viewport {
layout : 'border',
autoHeight: true,
autoWidth: true,
items : [{
region : 'center',
layout : 'fit', //tried others but whatever other layout manager I use the region gets minimized even if I try to set fixed height
items : verticalLayoutPanel
region: 'west',
layout: 'fit',
width: 250,
items: treePan

treePan {
autoScroll : true //works for vertical scrollbar but doesn't set horizonal scrollbar

verticalLayoutPanel {
autoScroll :true,
layout {
type : 'vbox',
align : 'stretch'

1. Now the vertical scroll bar for the treegrid shows up. However even calling showHorizonalScroller does not show the horizontal scroller.

2. The vertical layout panel in the center does not show a scroller no matter what I try.

28 Nov 2011, 6:48 AM
If this is using 4.0.7 or before... I would say that 4.1 PR1 replaced the scrolling mechanism we were using which fixed every scrolling problem I have come across so far.

28 Nov 2011, 7:07 AM
Yes using the newest 4.0.7 version.

28 Nov 2011, 7:32 AM
Ok I switched to 4.1 PR1 and the first issue is fixed but the 2nd issue still exists.

28 Nov 2011, 7:59 AM
What is verticalLayoutPanel? The center region won't scroll as you are using layout fit but verticalLayoutPanel could.

28 Nov 2011, 8:24 AM
verticalLayoutPanel is a Panel inside the center region that has vbox layout.

I tried to set autoscroll : true for the verticalLayoutPanel but nothing.

Another thing I noticed is that problem 1 is solved but the horizontal scroller now always is displayed even if the content of the west region, the tree grid does not use all space given.

29 Nov 2011, 2:20 AM
In fact changing from 4.0.7 to 4.1 PR1 I found some other functions to be broken such as the object in the itemclick listener of the treepanel returning undefined values.