PDA

View Full Version : Why does collapseModeMini only work with lazy rendering?



Wilrik
17 Mar 2011, 12:55 PM
Hi,

I have a Borderlayout width center and east region. In the east panel I want to use collapseMode:'mini' for the smal button to collapse and expand.

Only when I use lazy rendering for the east panel I get the desired effect. When creating a panel the normal way The eastpanel shows up, can collapse, but after expanding and leafing focus it collapses again.
I took me a couple of hours to find out that lazy rendering solved this. Still wondering why this is?


This doesn't work:


var p = new Ext.Panel({
region: 'west',
xtype: 'panel',
split: true,
collapsible: true,
collapseMode: 'mini',
title: 'Some Info',
bodyStyle:'padding:5px;',
width: 200,
minSize: 200,
maxSize: 500,
html: 'West',
autoScroll: true
});


This does:


var p= {
region: 'west',
xtype: 'panel',
split: true,
collapsible: true,
collapseMode: 'mini',
title: 'Some Info',
bodyStyle:'padding:5px;',
width: 200,
minSize: 200,
html: 'West'
}