-
15 Mar 2012 1:14 AM #1
Answered: Toolbars and button alignment
Answered: Toolbars and button alignment
Aligning stuff in a toolbar left right and center is no problem, but now I'm looking for a way to combine alignments.
I.e. I'm looking to have a first set of buttons centered in the middle and then a couple more aligned to the right.
can anybody help me on this one?
-
Best Answer Posted by tvanzoelen
Just start with a fill
Code:Ext.onReady(function() { Ext.create('Ext.toolbar.Toolbar', { renderTo: document.body, width: 500, items: [ '->', { // xtype: 'button', // default for Toolbars text: 'Button' }, { xtype: 'splitbutton', text: 'Split Button' }, // begin using the right-justified button container '->', // same as { xtype: 'tbfill' } { xtype: 'textfield', name: 'field1', emptyText: 'enter search term' } ] }); });
-
15 Mar 2012 1:20 AM #2Ext JS Premium Member
- Join Date
- Apr 2008
- Location
- Groningen - Netherlands
- Posts
- 1,010
- Vote Rating
- 23
- Answers
- 75
You could try to use the fill http://docs.sencha.com/ext-js/4-0/#!...t.toolbar.Fill to align to the right
-
15 Mar 2012 1:50 AM #3
-
15 Mar 2012 2:01 AM #4Ext JS Premium Member
- Join Date
- Apr 2008
- Location
- Groningen - Netherlands
- Posts
- 1,010
- Vote Rating
- 23
- Answers
- 75
Just start with a fill
Code:Ext.onReady(function() { Ext.create('Ext.toolbar.Toolbar', { renderTo: document.body, width: 500, items: [ '->', { // xtype: 'button', // default for Toolbars text: 'Button' }, { xtype: 'splitbutton', text: 'Split Button' }, // begin using the right-justified button container '->', // same as { xtype: 'tbfill' } { xtype: 'textfield', name: 'field1', emptyText: 'enter search term' } ] }); });
-
15 Mar 2012 2:03 AM #5


Reply With Quote