How to use removeListener() in ExtJS?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vibhakhushi
    New Member
    • Mar 2010
    • 33

    #1

    How to use removeListener() in ExtJS?

    Hello,

    I am working on Extjs 2.3. I would like to know how to use removeListener( ) for Ext.Window. I want to disable window minimization.

    Thanks in advance.
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    i think the best way would be to configure the window to be 'unminimizable' ... since just dropping the handler would lead to a remaining tool-control so that just nothing would happen when the user clicks it ... but when you insist on removing the listener then the following should work:

    Code:
    var win = // ref to your Ext.Window;
    
    win.removeListener('minimize', win.minimize);
    
    // or the shorthand
    
    win.un('minimize', win.minimize);

    Comment

    Working...