Mohamed Fahim
Mohamed Fahim

Reputation: 11

remove a tab item in extjs

I have a code as follows

var tabs1 = new Ext.TabPanel('tabs2');
idHistoryReportsTabItem = tabs1.addTab('script1', idHistoryReportsTabCaption);
seatHistoryReportsTabItem = tabs1.addTab('markup1', seatHistoryReportsTabCaption);
tabs1.activate("script1");

i want to remove tab item markup1 from the tabs2, how do i do?

Upvotes: 1

Views: 3620

Answers (2)

ilyas
ilyas

Reputation: 1

tabs1.getItem('markup1').remove();

Upvotes: 0

ischenkodv
ischenkodv

Reputation: 4255

As far as I know there is no addTab function in Tabpanel: http://dev.sencha.com/deploy/ext-3.3.1/docs/?class=Ext.TabPanel You can use the "add" and "remove" functions to achieve this:

Ext.getCmp('tabs2').remove('markup1');

Upvotes: 3

Related Questions