Dec 14, 2011, 2:35 AM
How to display / hide 'close' button on Tab
Hi all,
Could you please suggest me how to display/hide 'close' button on Tab (near tab title).
I have a TabPanel1, Tab2 on TabPanel1 can be close. but when user open form in Tab2.
I want to hide 'close' button on Tab2 and then when user close form in Tab2 the 'close' button
on Tab2 will display agian.
Tab 2 open with below command
Could you please suggest me how to display/hide 'close' button on Tab (near tab title).
I have a TabPanel1, Tab2 on TabPanel1 can be close. but when user open form in Tab2.
I want to hide 'close' button on Tab2 and then when user close form in Tab2 the 'close' button
on Tab2 will display agian.
Tab 2 open with below command
var addTab=function(tabPanel, id, tabtitle, url) {
var tab=tabPanel.getComponent(id);
if(!tab){
tab=tabPanel.add({
id: id,
title: tabtitle,
closable: true,
autoLoad: {
showmask: true,
url: url;
mode: "iframe",
maskMsg: "Loading "+tabtitle+"..."
}
});
}
tabPanel.setActiveTab(tab);
}
Thank you.