PDA

View Full Version : Problem with collapsed panel



Ourysso
5 Jan 2011, 3:35 AM
24108

When I click on the little button on the top of the collapsed panel the event "expand" is triggered but when I click on the bar nothing happens. Which event shoud i use?

fay
5 Jan 2011, 3:53 AM
Set the Panel's titleCollapse (http://dev.sencha.com/deploy/dev/docs/?class=Ext.Panel&member=titleCollapse) config option to true.

Ourysso
5 Jan 2011, 4:01 AM
still doesn't work =/

here is the code:


var defaults = {
region: 'west',
id: 'painel_lateral',
title: ' ',
split: false,
width: 200,
minSize: 175,
maxSize: 400,
collapsible: true,
margins:'0 0 0 0',
cmargins:'0 0 0 0',
layout:'fit',
animCollapse: true,
collapsed: true,
collapseFirst: false,
titleCollapse: true,
items: [menu_lateral],
listeners: {
expand: function() {
Ext.Msg.alert('test','test');
}
}

}

var cfg = Ext.apply({}, config, defaults);
var cmp = new Ext.Panel(cfg);