PDA

View Full Version : Panel titleCollapse = false not working



lucasguaru
10 Oct 2011, 11:19 AM
Hi there,

I'm trying to use titleCollapse to avoid showing two titles when clicking on title but looks like it's ignoring the titleCollapse. I want to expand / collapse when clicking on it's icon.
Should it be with something else beside collapsible : true ?

Thanks

twaindev
10 Oct 2011, 2:06 PM
Works fine here:


Ext.onReady(function() {
Ext.create('Ext.panel.Panel', {
title: 'Test',
titleCollapse: false,
collapsible: true,
renderTo: Ext.getBody(),
html: 'lorem ipsum'
});
});

lucasguaru
11 Oct 2011, 11:13 AM
It's weird here.
I have a screen with simple panel that works fine but the other one...
I see the problem is different.
The grid is on a region layout, on north exactly.
When it is expanded, the header don't collapse when I click it but when it's collapsed, I can click it and it opens over the grid on center region, showing two titles.

Thoughts?

twaindev
11 Oct 2011, 12:17 PM
I can confirm the strange behavior when titleCollapse = true, but with titleCollapse = false clicking the title doesn't collapse/expand it.


Ext.onReady(function() {

Ext.create('Ext.container.Viewport', {
renderTo: Ext.getBody(),
layout: 'border',
items: [
{
region: 'north',
xtype: 'panel',
title: 'north',
height: 100,
collapsible: true,
titleCollapse: false
},
{
region: 'center',
xtype: 'panel',
title: 'center'
}
]
});

});


Update: After a first click on the collapse tool the titleCollapse is indeed ignored, so you better file a bug report.

lucasguaru
17 Oct 2011, 3:29 AM
You are right.
You can see this on their examples.
http://docs.sencha.com/ext-js/4-0/extjs/examples/layout/border.html
When the panel is collapsed, the titleCollapse = false are ignored and it appears over the other panels.

lucasguaru
17 Oct 2011, 5:09 AM
Evant answered here
http://www.sencha.com/forum/showthread.php?150781-4.0.6-animCollapse-false-not-honored
It just need to have floatable: false.
Thanks