Putting Ext JS toolbar items on the right side

November 19, 2011

I wanted to add an item to a toolbar in one of my ExtJS panels but was having a little trouble. I could get them on the toolbar fine but I wanted them displayed on the right side of the panel. This was proven tricky, especially as I’m rather new to ExtJS

Then I found the “tbfill” xtype. This made it simpler than it ever could be:

var tb = new Ext.Toolbar({
        items: [{ xtype: 'tbfill' },
            {text: 'Compliment me', handler: function(){ alert('Nice...umm...hair?!'}}
        ]
    });

It’s quick tools like this that have really got me hooked on ExtJS.

Stay in Touch!

Subscribe to our newsletter.

Solutions Architecture

browse through our blog articles

Blog Archive