开发者

ExtJs3: how to make closable tab of tabpanel not closable and back?

开发者 https://www.devze.com 2023-04-06 11:38 出处:网络
I want to be able to hide \'x\' button near the tab title and to be able to show it back wit开发者_如何学JAVAhout a low level code manipulating DOM but using component level api functions if it is pos

I want to be able to hide 'x' button near the tab title and to be able to show it back wit开发者_如何学JAVAhout a low level code manipulating DOM but using component level api functions if it is possible.


You should manually hide the close button in the DOM.

I tested this code over ExtJS 3 API page. It toggles close button on the second tab:

var tabPanel = Ext.getCmp('doc-body');
var tabHeader = tabPanel.items.get(1).tabEl;
Ext.get(tabHeader).down('a.x-tab-strip-close').toggleClass('x-hidden')
0

精彩评论

暂无评论...
验证码 换一张
取 消