The following code snippet will create an EmployeeCreateForm in sencha. Try this out:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
EmployeeCreateForm = new Ext.FormPanel({ labelAlign: 'top', bodyStyle:'padding:5px', width: 600, items: [{ layout:'column', border:false, items:[{ columnWidth:0.5, layout: 'form', border:false, items: [FirstNameField, LastNameField] } }], buttons: [{ text: 'Save and Close', handler: createEmployee },{ text: 'Cancel', handler: function(){ EmployeeCreateForm.hide(); } }] }); EmployeeCreateForm= new Ext.Window({ id: 'EmployeeCreateForm', title: 'Creating a New Employee', closable:true, width: 610, height: 250, plain:true, layout: 'fit', items: EmployeeCreateForm }); |



