Feb 09, 2010, 10:23 AM
add icon to a Tab
i am trying to add icon to a tab when it is generated. I don't get any error message when running the code below. But the icon is not generated.
Thanks so much for your help.
Thanks so much for your help.
function addHomeTab(tabPanel, id, url,icon) {
var tab = tabPanel.getComponent(id);
if (!tab) {
tab = tabPanel.add({
id: id,
title: id,
closable: false,
iconCls: icon,
autoLoad: {
showMask: true,
url: url,
mode: 'iframe',
maskMsg: 'Loading ' + url + '...'
}
});
tabPanel.setActiveTab(tab);
}//calling addtab
<ext:MenuItem ID="TextMenuItem2" runat="server" Text="Member1">
<Listeners>
<Click Handler="addTab(#{TabPanel1}, 'member', 'member.aspx','house');" />
</Listeners>
</ext:MenuItem>