0

I have a statusbar where I want to set a button at the very left side of it. I can place it left using margin but it does not set completely at left side. But I need to do it. Can anyone please help me on this ?! Here is my code below :

me.tbar = Ext.create('Ext.ux.StatusBar', {
        id: 'showgridtbar',
        tooltip: 'Print Payment Details',
        topBorder:false,
        items: [
          {xtype: 'button', iconCls: 'printp', margin: '0 0 0 -90', tooltip: 'Print Payment Details'}
        ],
    }),
sra
  • 23,820
  • 7
  • 55
  • 89
Sumon Bappi
  • 1,937
  • 8
  • 38
  • 82
  • Add tags like Javascript like **relevant popular tag** too. It attracts more users – Shiplu Mokaddim Jan 13 '13 at 05:42
  • Why are you using a StatusBar as the top bar? isn't better to use a Toolbar there? What are your requirements? What is the class in wich the bar resides, a simple Panel? A Window? The StatusBar simply aligns items at right because it adds a text control to show the messages and, everything else is aligned to the right, it has a filler after the text. – VoidMain Jan 13 '13 at 11:12
  • @VoidMain tbar works. thanks – Sumon Bappi Jan 14 '13 at 03:51

1 Answers1

2

That is quite easy, you need to use statusAlign: 'right' like so

bbar: Ext.create('Ext.ux.StatusBar', {
     statusAlign: 'right', // the magic config
     items: [{
            text: 'A Button'
     }, '-', 'Plain Text', ' ', ' ']
})

Here's a JSFiddle

sra
  • 23,820
  • 7
  • 55
  • 89