Results 1 to 2 of 2

Thread: How do an action when layout close

  1. #1
    Sencha User
    Join Date
    Aug 2009
    Posts
    113

    Arrow How do an action when layout close

    Hello,

    I would like to do an action when I close a window layout.

    But nothing append when I do that, and I think that I don't use the good event ?

    Code:
    var button = Ext.get('show-btn');
    
        button.on('click', function(button){
        
            //Ext.Msg.alert('Link', 'Link to something interesting.');
                 
           Ext.get('show-btn').dom.disabled = true; // Button disabled
    
            var win = new Ext.Window({
                title: 'Layout Window',
                closable:true,
                width:600,
                height:350,
                //border:false,
                plain:true,
                layout: 'border',
                listener: {beforedestroy: function () {
                        Ext.get('show-btn').dom.disabled = false; // That don't work !!!!
                        Ext.Msg.alert('Message', 'Closing.');         // And that too !!!!
                        //Ext.get('show-btn').dom.enable = true;
                    }},
                items: [nav, tabs]
            });
    
            win.show(this);
    
     });

  2. #2
    Sencha User
    Join Date
    Aug 2009
    Posts
    113

    Default

    I find the solution :

    Code:
       var win = new Ext.Window({
                title: 'Layout Window',
                closable:true,
                width:600,
                height:350,
                //border:false,
                plain:true,
                layout: 'border',
                items: [nav, tabs]
            });
    
            win.show(this);
            
            win.on('close', function(){Ext.get('show-btn').dom.disabled = false;});

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •