extjs - Put a save button in the middle of the form -
i have form 2 textfields aligned in 'vbox' format align 'stretch'. wish add save button should aligned in middle of form. how define button aligned in middle in usual alert ok button in middle of alert box.
if can done without csss preferable.
buttonalign : alignment of buttons added panel. valid values 'right', 'left' , 'center' (defaults 'right' buttons/fbar, 'left' other toolbar types).
another way use dockeditems layout:'hbox' , pack:'center'
ext.application({ name: 'fiddle', launch: function() { ext.create('ext.form.panel', { width: 300, bodypadding: 10, layout: { type: 'vbox', align: 'stretch' }, items: [{ xtype: 'textfield', title: 'contact info', name: 'name', fieldlabel: 'name' }, { xtype: 'textfield', name: 'email', fieldlabel: 'email address' }], buttons: [{ text: 'save' }], buttonalign: 'center', renderto: ext.getbody() }) } });
Comments
Post a Comment