PDA

View Full Version : Collapsed panel in border-layout: Permanent expand on title-click



suamikim
6 Sep 2012, 1:08 AM
Hey there,

i have 2 panels inside a border-layout. The second one is collapsible with configs 'collapsed' and 'titleCollapse' set. When i click on the title it just shows the panel "temporary" which means that it doesn't stick but collapses automatically after i click anywhere else inside my window. It kind of floats in...

Working example: http://jsfiddle.net/suamikim/LNfm8/

Ext.onReady(function() {
Ext.create('Ext.window.Window', {
width: 500,
height: 300,

layout: 'border',

items: [{
xtype: 'panel',
title: 'panel1',
region: 'center',
flex: 1
},{
xtype: 'panel',
title: 'panel2',
region: 'south',
flex: 1,

collapsible: true,
collapsed: true,
animCollapse: false,
collapseDirection: Ext.Component.DIRECTION_BOTTOM,
titleCollapse: true
}]
}).show();
});

I guess this is a feature of the border-layout because if i put the 2 panels into a box-layout the collapsed panel permanently expands after a click on the title-bar.

I would really appreciate if anyone could tell me how to turn that feature of the border-layout off.

Thanks

Farish
6 Sep 2012, 1:14 AM
if you want the panel to remain expanded, then you need to click on the "double-arrow" tool in the panel header.

suamikim
6 Sep 2012, 3:07 AM
I'm aware of this and it also stays expanded if i click on the title a second time after it has been "floated in" but i just don't want this floating-behaviour at all because i experienced it as pretty buggy so far.

That is why i'm asking if i can turn it completely off like in a box-layout.

Thanks

suamikim
15 Sep 2012, 3:30 AM
It couldn't be easier: There's the config 'floatable' which only needs to be set to false...

See the fiddle: http://jsfiddle.net/LNfm8/1/

I'm a little ashamed for myself for overlooking this config and on the other hand i'm dissapointed at the forum that nobody answered this simple one...