Feature Request: allow addTab to accept objects

January 6th, 2009
  • Could addTab() be allowed to accept an object as it's first argument like everything else in extjs can?


  • what's "everything else" :-/

    if you need to do something special with addTab you could always add custom functionality yourself like so
    Ext.override(Ext.TabPanel, {
    addTab : function(cfg, text, content, closable) {
    var id;
    if (typeof(cfg) == 'string') { // check typeof cfg
    id = cfg;
    } else if (typeof(cfg) == 'object') {
    id = cfg.id;

    // do your own thing here with the cfg object
    // ...
    // ...
    }

    var item = new Ext.TabPanelItem(this, id, text, closable);
    this.addTabItem(item);
    if (content) {
    item.setContent(content);
    }
    return item;
    }
    });


  • TabPanel has already been upgraded in 2.0.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Feature Request: allow addTab to accept objects , Please add it free.