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?