PDA

View Full Version : [Ext 4.1.1] how to avoid horizontal scrollbar when vertical scrollbar appears.



eilijah
27 Feb 2015, 4:01 AM
Hello,

I am working with 4.11 and i have a gridPanel with rowexpanders in an Ext.Window. When i expand the cells i have a vertical overflow and so the vertical scrollbar appears as expected. But it seems that this vertical scrollbar push the contentin an horizontal overflow causing the display of an horizontal scrollbar.

what is the right way to handle this problem please?


My layout is like :


{ xtype : 'window',
modal : true,

width: 500,
height: 500,
minWidth: 400,
minHeight: 400,


layout: 'fit',


items: [{
xtype: 'form',
layout: {
type: 'vbox',
align: 'stretch'
},
items: [{
xtype: 'container',
layout: {
type: 'hbox',
align: 'stretch'
},
items: [{
xtype: 'button',
text: 'Show 2'
},{
xtype: 'button',
text: 'Show 2'
}]
},
{
xtype: 'gridpanel',
flex: 1,
plugins: [{
ptype: 'rowexpander',
...
}],
columns: [...]
}],


dockedItems: [{
xtype: 'toolbar',
dock: 'bottom',
items: [{
text: 'Save'
},{
text: 'Cancel'
}]
}]
}]
}

yeghikyan
27 Feb 2015, 11:07 AM
Try to use 'border' layot instead of 'fit' layout, so your grid will have region: 'center' and form, region 'north'.IMHO you can also set the border: 0 for grid and form.P.S.There is also the 'vbox' layout... :)