Results 1 to 3 of 3

Thread: Aligning button to the right in a toolbar using Architect 4.0

  1. #1
    Sencha Premium User EricRicher's Avatar
    Join Date
    Jul 2014
    Posts
    45

    Default Answered: Aligning button to the right in a toolbar using Architect 4.0

    Can someone tell me how I can align a button to the right in a toolbar using Architect 4.0 to build?

    I know that if I was to write code directly, I could use the '->' shortcut when defining the items for the toolbar.

    Is there an equivalent in SA?

    I tried to set docked:'right' in SA but that docks the button outside the toolbar to its right. I tried that trick in Fiddle with the same result so it is not a SA problem.

    However, why is it that if one sets docked:right on a item in a toolbar, the item ends up outside the toolbar when rendered?

    I am using ExtJs 6.2.0 Modern as the SA framework.

    Thanks in advance

  2. Hi

    You need to put a spacer before the button

    Code:
    items: [{
        xtype: 'spacer'
    }, {
        xtype: 'button',
        text: 'MyButton',
    }]
    https://fiddle.sencha.com/#view/editor&fiddle/1l73



    Regards
    Petr

  3. #2
    Sencha User
    Join Date
    Sep 2014
    Location
    Central Europe
    Posts
    795
    Answers
    103

    Default

    Hi

    You need to put a spacer before the button

    Code:
    items: [{
        xtype: 'spacer'
    }, {
        xtype: 'button',
        text: 'MyButton',
    }]
    https://fiddle.sencha.com/#view/editor&fiddle/1l73



    Regards
    Petr

  4. #3
    Sencha Premium User EricRicher's Avatar
    Join Date
    Jul 2014
    Posts
    45

    Default

    Quote Originally Posted by petr.vecera View Post
    Hi

    You need to put a spacer before the button

    Code:
    items: [{
        xtype: 'spacer'
    }, {
        xtype: 'button',
        text: 'MyButton',
    }]
    https://fiddle.sencha.com/#view/editor&fiddle/1l73



    Regards
    Petr
    I should have thought of that! So that`s the purpose of Spacer.
    Thanks

Similar Threads

  1. Replies: 1
    Last Post: 17 Dec 2012, 7:52 AM
  2. problem aligning bttons in toolbar
    By extusername in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 16 Mar 2010, 4:26 AM
  3. question on right-aligning toolbar buttons
    By arthurakay in forum Community Discussion
    Replies: 0
    Last Post: 7 Dec 2009, 11:26 AM
  4. Bottom toolbar not aligning properly
    By nanich in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 15 Dec 2008, 3:21 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
  •