Jun 27, 2011, 4:11 PM
How to add a icon to tabpanel?
Why it's not working?
<script type="text/javascript">
var addTab = function(tabPanel, id, url) {
var tab = tabPanel.getComponent(id);
if (!tab) {
tab = tabPanel.add({
id: id,
title: id,
closable: true,
IconCls: "icon-application",
autoLoad: {
showMask: true,
url: url,
mode: "iframe",
maskMsg: "Loading... "
}
});
tab.on("activate", function() {
var item = TreePanel1.menu.items.get(id + "_item");
if (item) {
TreePanel1.setSelection(item);
}
}, this);
}
tabPanel.setActiveTab(tab);
}
</script>