Search code examples
extjs4tbar

left justify text in an extjs4 tbar button


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'; 
                                    }
                                }                                   

                            ]
                        }

Solution

  • textAlign : String

    This is what I did above to get my solution