PDA

View Full Version : Border layout collapse



solovieff13
1 Dec 2010, 7:37 AM
Hi, is there any way to make all items in border layout collapsible? I have two items:

items: [panel1 = new Ext.Panel({
region: 'center',
layout: 'fit',
collapsible: true,
//collapseMode: 'mini',
id: 'p1id',
split: true,
margins: '5 5 0 5',
title: 'Title',
items: my_grid_item,
height: consoleHeight,
listeners: {
beforeCollapse: function () {
alert('collapsed');
}
}
}), panel2 = new Ext.Panel({
region: 'south',
layout: 'border',
collapsible: true,
//collapseMode: 'mini',
id: 'p2id',
split: true,
margins: '5 5 0 5',
title: 'title2',
items: items2,
height: consoleHeight
})]If I collapse south item -- all is okay, center item fills in all the free space, but when I collapse panel1, free space is always free. How can I make panel1 behave like panel2 on collapse?