1. #1
    Sencha User
    Join Date
    Aug 2011
    Location
    Bangalore
    Posts
    59
    Answers
    1
    Vote Rating
    0
    Sabareesh is on a distinguished road

      0  

    Default Unanswered: Right aligning a button in a tab bar

    Unanswered: Right aligning a button in a tab bar


    I have the following code for adding a button in tab bar , which has 3 tabs
    listeners: {
    afterrender: function () {
    var bar = Ext.getCmp('artistTab').getTabBar();
    bar.insert(4, {
    xtype: 'button',
    text: 'Add New Form',
    id: 'formButton',
    handler: function () {
    // Some code
    }
    });
    }
    }

    I want this button to be at the right corner of the tab bar , how can i do it .

    Thanks

  2. #2
    Sencha User
    Join Date
    Mar 2010
    Posts
    245
    Answers
    2
    Vote Rating
    1
    Ex_Soft is an unknown quantity at this point

      0  

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Location
    Bangalore
    Posts
    59
    Answers
    1
    Vote Rating
    0
    Sabareesh is on a distinguished road

      0  

    Default


    Thanks .

    I have alrady tried that but it is not working in tabbar , if it is toolbar it will work fine . But with tab bar i am not sure how to use .

    If i add 'tbfill' i am getting an empty tab and next to that the button appears . I want the button to be at the right corner

    one option is that i can use margins:'0 0 0 50' but i dont want to hardcode the values .

    Any suggestions ?

    Thanks.

  4. #4
    Sencha User
    Join Date
    Aug 2011
    Location
    Bangalore
    Posts
    59
    Answers
    1
    Vote Rating
    0
    Sabareesh is on a distinguished road

      0  

    Default


    I fixed that ,. I made two insert statements as below and it is working fine

    listeners: {
    afterrender: function () {
    var bar = Ext.getCmp('artistTab').getTabBar();

    bar.insert(3,{xtype: 'tbfill'});

    bar.insert(4,{
    xtype: 'button',
    text: 'Add New Form',
    id: 'formButton',
    //margins : '0 0 0 745',
    handler: function () {
    //Some code
    }
    });
    }
    }

    Thanks .

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar