title: Add a tab(item) to tabpanel by button clicking, extjs
body: <p>I have a tabpanel, that initially has 1 tab and a button. But the user should be able to add more tabs by clicking on the button. Here is the code so far:</p>
  
  <pre><code>var tabPan = Ext.create('Ext.TabPanel', {
  listeners: {
      beforetabchange: function(tabs, newTab, oldTab, eOpts) {
          if (newTab.title=='Add') { // Or some other condition
  
              return false; 
          }
      }
  },
  items:[
  {
    title: 'Default Tab',
    html: innerHtml  
  },
  {
    xtype: 'button',
    title : 'Add',
  },
  ]
  })
  </code></pre>