2
votes

I have an item like so (JSFiddle Demo):

{
    region: 'west',
    title: 'Instead of toolbar',
    collapsible: true,
    width: 250,
    tbar: [{
        xtype: 'button',
        text: 'Button',
        style: {
            background: 'green'
        },
        handler: function() {}
    }]
}

I want my tbar instead of the title like (1->2)

enter image description here

I tried to remove title but it's not working. How to do that thanks :).

1

1 Answers

6
votes

Get rid of the header and add the same collapse tool to the toolbar:

{
    region: 'west',
    collapsible: true,
    header: false,
    width: 250,
    tbar: [
        {
            xtype: 'button',
            text: 'Button',
            style: {
                background: 'green'
            },
            handler: function (){}
        },
        '->',
        {
            type: 'left',
            xtype: 'tool',
            handler: function(t) {
                this.up('panel').collapse();
            }
        }
    ]
}