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.

enter image description here

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()         })     } }); 

fiddle


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -