PDA

View Full Version : Aligning button to the right in a toolbar using Architect 4.0



EricRicher
24 Nov 2016, 12:11 PM
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

petr.vecera
25 Nov 2016, 4:05 AM
Hi

You need to put a spacer before the button



items: [{
xtype: 'spacer'
}, {
xtype: 'button',
text: 'MyButton',
}]


https://fiddle.sencha.com/#view/editor&fiddle/1l73



Regards
Petr

EricRicher
25 Nov 2016, 5:41 AM
Hi

You need to put a spacer before the button



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