Hi!
on button Click event , you may remove or add components in your toolbar or panel.
Sample is listed below:-
This sample adds button in a panel after a button is clicked.
Code:
//Your Button
{
text:'Sample Button'
handler:yourScope.onSampleButtonClick
}
onSampleButtonClick:function(button){
var toolbar=button.findParentByType('toolbar');
toolbar.add([{text:'Button 1'}, {text:'Button 2'}]);
panel.doLayout();
}
or you can also use .index instead of add to Inserts a Component into this Container at a specified index