PDA

View Full Version : Resize event for Tab Panel doesn't trigger



ahsec
20 Feb 2013, 8:33 AM
Hello

Does any one know about anything else one needs to do to bind a tab panel to a resize event?

I have a tab panel and I bound it to a resize event. However, when I invoke setHeight for that panel, the handler isn't invoked.

Is there anything in the configuration I need to change to make it trigger?

Thanks

scottmartin
20 Feb 2013, 11:41 AM
Please review the following:



var panel = Ext.create('Ext.tab.Panel', {
width: 400,
height: 400,
renderTo: document.body,
items: [{
title: 'Foo'
}, {
title: 'Bar',
tabConfig: {
title: 'Custom Title',
tooltip: 'A button tooltip'
}
}],

listeners : {
resize: function(){
console.log('resize');
}
}
});

console.log('--before');
panel.setHeight(300);
console.log('--after');


Scott.