PDA

View Full Version : tbtext align center



ing.amdangelo
14 Feb 2012, 2:19 AM
Is it possible put on the center of the toolbar a tbtext ??

friend
14 Feb 2012, 4:25 AM
You can override the default layout of the Toolbar, like so:



Ext.create('Ext.window.Window', {
dockedItems: [{
xtype: 'toolbar',
dock: 'top',
layout: {
type: 'hbox',
pack: 'center'
},
items: [{
xtype: 'tbtext',
text: 'Some Centered Text'
}]
}],
height: 250,
title: 'Toolbar Test',
width: 350
}).show();