1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    2
    Vote Rating
    0
    killown is on a distinguished road

      0  

    Default Unanswered: [Solved] Removing an Ext.draw.Component dynamically

    Unanswered: [Solved] Removing an Ext.draw.Component dynamically


    I'd like to know how to remove an Ext.draw.Component dynamically
    I have the follow example:
    Code:
    Ext.onReady(function() {
        var sencha = Ext.create('Ext.draw.Component', {
    
            id: 'test',
    
            width: 300,
    
            height: 300,
    
            resizable: {
    
                dynamic: true,
    
                pinned: true,
    
                handles: 'all'
    
            },
    
            renderTo: Ext.getBody(),
    
    
    
    
    
    
    
      gradients: [{
                id: 'grad1'
    
            }],
    
    });
    
    new Ext.create('Ext.Button', {
    
        text: 'position',
    
        renderTo: Ext.getBody(),
    
        handler: function() {
    
        Ext.getCmp("test").IWANTTOREMOVETHECOMPONENT.remove();
    
        andupdateit.update();
    
    },
    
    
    
    }).show();
    
    
    
    });
    I want to remove the component responsible by gradients after press the button, but I didn't find in the API a friendly way to do it

    could anyone help me?

  2. #2
    Sencha User
    Join Date
    Mar 2011
    Posts
    2
    Vote Rating
    0
    killown is on a distinguished road

      0  

    Default


    solved that by using Ext.getCmp('test').destroy()

Tags for this Thread