PDA

View Full Version : [CLOSED] How to override tool methods in new ext.window.



softmachine2011
Nov 13, 2013, 10:53 AM

Daniil
Nov 13, 2013, 1:05 PM
Hi @softmachine2011,

Yes, Maximizable="true" setting adds a default restore tool.

if (me.maximizable) {
me.addTool({
type: 'maximize',
handler: Ext.Function.bind(me.maximize, me, [])
});
me.addTool({
type: 'restore',
handler: Ext.Function.bind(me.restore, me, []),
hidden: true
});
}

The simplest would be:

new Ext.Window({
maximizable: true,
restore: function() {
alert("restore");
}
})