Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: how can we align center tabs in tabbed panel

  1. #11
    Sencha - Documentation Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,162
    Vote Rating
    257
      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
    9,390
    Vote Rating
    498
      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
    4
      0  

    Wink

    This simple config option seems to do the trick:

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

  4. #14
    Ext JS Premium Member
    Join Date
    Feb 2009
    Posts
    487
    Vote Rating
    6
      0  

    Default

    Quote Originally Posted by oklymenko View Post
    This simple config option seems to do the trick:

    Code:
        tabBar: {
            layout: {
                pack: 'center'
            }
        },
    This works in 4.1.3 but not in 4.1.1

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •