Results 1 to 4 of 4

Thread: center title for buttongroup

  1. #1
    Sencha User
    Join Date
    Jan 2010
    Posts
    30
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Vote Rating
    1271
      0  

    Default

    Like here:

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

    Looks like by default the titles are centered.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Jan 2010
    Posts
    30
    Vote Rating
    0
      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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Vote Rating
    1271
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

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

Tags for this Thread

Posting Permissions

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