[CLOSED] Add dynamic component in tabpanel in fixed position

  1. #1

    [CLOSED] Add dynamic component in tabpanel in fixed position

    Hi guys,

    i have a tabPanel with component add dynamic with js function.
    When i add component, this one is add at the end.

    It's possible to add component in second position for example ?

    addTabPanel (js)

    //Add tab in Tabpanel
    function addTabs(type, guid)
    {
        try {
            var index = Ext.getCmp('TabPane').items.length + 1;
            var tab = Ext.getCmp('TabPanel').add(
        {
            id: "Tab" + index,
            title: type,
            closable: true,
            layout: 'fit',
            border: false,
            loader:
            {
                url: "../modules/module.aspx?i=" + index + "&g=" + guid,
                renderer: "frame"
            }
        });
            Ext.getCmp('TabPanel').setActiveTab(tab);
        }
        catch (err) {
            App.direct.UnhandledException(err);
        }
    }
    Regards

    Yoann
    Last edited by Daniil; Dec 07, 2012 at 12:56 PM. Reason: [CLOSED]
  2. #2
    Hi Yoann,

    I think it is possible using the insert method instead of the add one.
    http://docs.sencha.com/ext-js/4-1/#!...-method-insert
  3. #3
    thank you very much

Similar Threads

  1. [CLOSED] Dynamic header column component direct event Issue
    By legaldiscovery in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 21, 2015, 10:56 PM
  2. [CLOSED] Get parent position X and Y from component dynamic
    By stoque in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Jul 30, 2011, 3:57 PM
  3. [CLOSED] Insert tab at Position (n) on TabPanel
    By iansriley in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 14, 2009, 3:24 PM
  4. TabPanel tabs start position
    By aghanem in forum 1.x Help
    Replies: 5
    Last Post: Apr 26, 2009, 5:03 PM
  5. Replies: 2
    Last Post: Feb 09, 2009, 12:21 PM

Tags for this Thread

Posting Permissions