1. #11
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,800
    Vote Rating
    167
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    The previous code works for 4.1, but I just noticed it won't work for 4.0.x.

    The following will work for 4.0.x as well as 4.1:
    Code:
    Ext.create('Ext.tab.Panel', {
        width: 400,
    height: 400,
    renderTo: document.body,
    items: [{
    title: 'Foo'
    }, {
    title: 'Bar',
    tabConfig: {
    title: 'Custom Title',
    tooltip: 'A button tooltip'
    }
    }]
    , listeners: {
    afterrender: function (tp) {
    tp.tabBar.insert(0, Ext.widget('tbfill'));
    tp.tabBar.add(Ext.widget('tbfill'));
    }
    }
    });‚Äč

  2. #12
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,872
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Are you using 4.1? I tested his code in API docs and it works as he described.

    Scott.

  3. #13
    Ext JS Premium Member
    Join Date
    Dec 2009
    Posts
    65
    Vote Rating
    3
    oklymenko is on a distinguished road

      0  

    Wink


    This simple config option seems to do the trick:

    Code:
        tabBar: {
            layout: {
                pack: 'center'
            }
        },