Meinew
Meinew

Reputation: 514

Extjs button on the bottom right corner

this my code :

      {
           title: 'XXXXX',
           collapsible:true,
           items:[
                 {
                      xtype: 'button',
                      flex: 1,
                      text: 'click here',
                 },
            ],
       },

...

How can I align the button on the bottom-right corner of the container XXXXX?

Upvotes: 1

Views: 8742

Answers (1)

sra
sra

Reputation: 23975

I recommend you to use a panel instead of a container and place them in the dockedItems.

....
collapsible:true,
dockedItems: [{
    xtype: 'toolbar',
    dock: 'bottom',
    items: ['->',{
        text: 'click here'
    }]
}]
...

See the docs for more details on dockedItems

Edit -> without toolbar

....
collapsible:true,
dockedItems: [{
    xtype: 'container',
    layout: 'hbox',
    dock: 'bottom',
    items: [{
        xtype:'container',flex:1
    },{
        text: 'click here',minWidth: 50
    }]
}]
...

Upvotes: 2

Related Questions