0

I would like to remove the tool from my panel; SO I have this code, when I add tool Ext.widget to my panel and then I would like to remove this just created tool, how can I do this. I haven't fount the removeTool method. and I tried to us remove method and remove it, but nothing; Here is the code:

if (...) {
    var a = Ext.widget({
        id: 'kuku',
        xtype: 'tool',
        type: 'close',
        handler: Ext.Function.bind(me.close, me, [])
    });

    if (closable && !me.hasUICls('closable')) {
        me.addClsWithUI('closable');
        me.addTool(a);
    }
} else {
    if (Ext.getCmp('kuku') != null) {
        me.remove("kuku", false); //here how can I remove??
        me.doLayout();
    }
}
Mr. Polywhirl
  • 42,981
  • 12
  • 84
  • 132
Vahe Akhsakhalyan
  • 2,140
  • 3
  • 24
  • 38

1 Answers1

0

If you are unable to remove using id, try using component ref. as arg... something like below

me.remove(Ext.getCmp('kuku'), false); 
newmount
  • 1,921
  • 1
  • 12
  • 10