PDA

View Full Version : left justify text in an extjs4 tbar button



surajan
7 Dec 2012, 7:59 AM
I have the following tbar items. I am trying to left-justify the text inside the buttons. But I am unable to do so. Any suggestions?


{
tbar: [
{
xtype: 'button',
text: 'Home',
width: 120,
align:'left',
handler: function() {
document.location.href = BasePath;
}
}

]
},
{
tbar: [
{
xtype: 'button',
text: 'View Transfer Numbers',
width: 120,
handler: function() {
document.location.href =BasePath+'transfer';
}
}

]
}

droessner
7 Dec 2012, 10:17 AM
Use the textAlign config. See http://docs.sencha.com/ext-js/4-1/#!/api/Ext.button.Button-cfg-textAlign