PDA

View Full Version : Collapsing panel breaks in hbox layout?



winkelmann
29 Nov 2011, 4:45 AM
Hi there,

I'm having some strange problem with collapsing panels within hbox layout, I'm not sure if it's a but or if I'm simply doing something wrong. In the following example, I can't seem to get the collapsible panel to uncollapse, the header seems to stay the height it was before collapsing.


Ext.widget('window',{
title: 'test collapse',
width: 500,
height: 300,
layout: {
type: 'hbox',
align: 'stretch'
},
items: [{
title: 'should not collapse',
collapsible: true,
collapseDirection: 'left',
flex: 1
},{
title: 'test',
flex: 1
}]
}).show();

Any help is appreciated :)

mitchellsimoens
29 Nov 2011, 7:06 AM
Clicking on the header won't expand the panel. It just floats the panel out and will hide after a couple seconds. The expand tool will do the actual expanding.

winkelmann
29 Nov 2011, 7:09 AM
Expand is the word I was looking for there ;)
The problem is, that if i collapse the panel using the collapse tool, the panel hides, but the expand tool never shows. What you see in my screenshot is what the example looks like if i collapse the collapsible panel.

If I start with collapsed: true on the collapsible panel, everything works as expected.

skirtle
29 Nov 2011, 7:36 AM
I'd say it's a bug. I also notice that if you switch things round to a vbox it collapses OK but expansion goes horribly wrong.

On the plus side, it does appear to work fine in 4.1-pr1.

winkelmann
29 Nov 2011, 7:38 AM
Great to hear about it working in 4.1 ;) I guess there isn't gonna be any fix for the 4.0 branch though?

tobiu
29 Nov 2011, 9:35 AM
servus,

i can confirm that this is working with the latest SDK build of 4.1.

the beta should get released "soon" and it will have a completely changed layout engine. a hotfix for the current issues could take longer to create than the new version, so i recommend to wait.

winkelmann
30 Nov 2011, 12:24 PM
Great, looking forward to 4.1, just read the blog post and I'm loving all the changes :)