craig.marvelley
20 Aug 2008, 1:33 AM
Hi,
I'm new to Ext so apologies if this is expected behaviour!
My scenario is thus: I've a toolbar which is responsible for firing an action which, among other things, toggles a panel's collapse - the panel in question is in a border layout, with the following config:
{
id: 'summaryPanel',
title: 'Summary',
region: 'east',
split: true,
width: 250,
minSize: 250,
collapsible: true,
floatable: false,
hideCollapseTool: true
}
The panel is initally rendered without the collapse tool, as intended. However upon collapsing via my action, the expand button is displayed in the title bar, though the Panel docs for 'hideCollapseTool' state:
"True to hide the expand/collapse toggle button when collapsible = true, false to display it (defaults to false)."
I've traced the expand button addition through to the border layout Region class - the following code starting at line 336 of BorderLayout.js is responsible:
var t = this.toolTemplate.append(
this.collapsedEl.dom,
{id:'expand-'+this.position}, true);
t.addClassOnOver('x-tool-expand-'+this.position+'-over');
t.on('click', this.onExpandClick, this, {stopEvent:true});
So it seems that the region is overriding the panel behaviour. Shouldn't there be some kind of check first to make sure the panel's hideCollapseTool setting isn't true?
Cheers,
Craig
I'm new to Ext so apologies if this is expected behaviour!
My scenario is thus: I've a toolbar which is responsible for firing an action which, among other things, toggles a panel's collapse - the panel in question is in a border layout, with the following config:
{
id: 'summaryPanel',
title: 'Summary',
region: 'east',
split: true,
width: 250,
minSize: 250,
collapsible: true,
floatable: false,
hideCollapseTool: true
}
The panel is initally rendered without the collapse tool, as intended. However upon collapsing via my action, the expand button is displayed in the title bar, though the Panel docs for 'hideCollapseTool' state:
"True to hide the expand/collapse toggle button when collapsible = true, false to display it (defaults to false)."
I've traced the expand button addition through to the border layout Region class - the following code starting at line 336 of BorderLayout.js is responsible:
var t = this.toolTemplate.append(
this.collapsedEl.dom,
{id:'expand-'+this.position}, true);
t.addClassOnOver('x-tool-expand-'+this.position+'-over');
t.on('click', this.onExpandClick, this, {stopEvent:true});
So it seems that the region is overriding the panel behaviour. Shouldn't there be some kind of check first to make sure the panel's hideCollapseTool setting isn't true?
Cheers,
Craig