1. #1
    Sencha User
    Join Date
    Jan 2010
    Posts
    30
    Vote Rating
    0
    new is on a distinguished road

      0  

    Default center title for buttongroup

    center title for buttongroup


    I want to set a title for buttongroup with center align, i check setTitle() method but it doesnt get any align.
    any idea?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,620
    Vote Rating
    817
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Like here:

    http://dev.sencha.com/deploy/ext-4.0.../toolbars.html

    Looks like by default the titles are centered.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jan 2010
    Posts
    30
    Vote Rating
    0
    new is on a distinguished road

      0  

    Default


    If at first you didnt set title for your btngroup and then use setTitle for adding, the title align to left !

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,620
    Vote Rating
    817
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    This centered the title for me

    Code:
    var changeTitle = function() {
        var group = cnt.down('buttongroup');
        group.setTitle('Hello');
    }
    
    var cnt = Ext.create('widget.container', {
        renderTo : Ext.getBody(),
        width    : 400,
        height   : 400,
        items    : [
            {
                xtype   : 'buttongroup',
                columns : 3,
                title   : 'Test',
                items   : [
                    { text : 'Change Title', handler : changeTitle },
                    { text : 'Three' },
                    { text : 'Three' }
                ]
            }
        ]
    });
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Similar Threads

  1. How to align button inside buttongroup (ButtonGroup)
    By daniel_r in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 3 Apr 2011, 5:17 AM
  2. Is there any how to center a layout title?
    By Andre Froes in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 23 Sep 2010, 7:08 AM
  3. How to set the tabPanel title center align
    By cprabha in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 30 Mar 2009, 2:29 AM
  4. How to make title of a formpanel to the center...
    By extjsrrr in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 22 Jan 2009, 4:27 AM

Thread Participants: 1

Tags for this Thread