Search code examples
buttonextjsjavascriptextjs3formpanel

ExtJs changing layout of formpanel buttons


I have a formpanel

var form = new Ext.form.FormPanel({
    title: 'Form Layout',

    buttons: [
        {text: 'Save'},
        {text: 'Cancel'}
    ]

});

I want to change the layout of the buttons below, so that they appear one below the other. Can I assign a layout to these buttons or is there another way?


Solution

  • var form = new Ext.form.FormPanel({
    title: 'Form Layout',
    
    buttons: [{
    
        xtype: 'panel', 
        items: [
          {text: 'Save'},
          {text: 'Cancel'}
        ]
     }]
    

    });

    this helps, but maybe its not a proper solution till i find a real one. marking for now, will change later when a better one arrives