How to add a icon to tabpanel?

  1. #1

    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>
  2. #2
    Hi,

    Must be "iconCls" - lower register of the first letter.

    The Application icon css class must be registered as well.

Similar Threads

  1. [CLOSED] [2.0] TabPanel Icon
    By Timothy in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 22, 2012, 4:33 AM
  2. TabPanel - add icon
    By AlexMaslakov in forum 1.x Help
    Replies: 2
    Last Post: Aug 30, 2011, 12:43 PM
  3. Replies: 1
    Last Post: May 20, 2011, 5:02 AM
  4. [CLOSED] How to update the icon of a TabPanel on the fly?
    By rmelancon in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Oct 04, 2010, 9:38 PM
  5. icon on tabs in tabpanel
    By silverstarsky in forum 1.x Help
    Replies: 2
    Last Post: Nov 20, 2009, 5:11 AM

Posting Permissions