extjs3 - Extjs LabelAlign=top is not working in panel -
i want display label on top of text field, not displaying. below code.(in fact below code displays label @ right side of text field).i using extjs 3.4, note : using form panel not working expected (have pasted code below)
any appreciated.
ext.onready(function () { var contentspanel = new ext.panel({ labelalign: 'top', renderto: ext.getbody(), layout: 'form', defaulttype: 'textfield', items: [{ fieldlabel: 'first name', name: 'first' }] }); contentspanel.show(); }); ext.onready(function () { var contentspanel = new ext.form.formpanel({ renderto: ext.getbody(), defaulttype: 'textfield', labelalign: 'top', items: [{ fieldlabel: 'first name', name: 'first', labelalign: 'top' }] }); contentspanel.show(); });
labelalign property of field, not panel property. need configure field:
items:[{ fieldlabel: 'firstname', labelalign: 'top', name: 'first' }]
if want set labelalign panel fields, can add in panel config:
var contentspanel = new ext.panel({ fielddefaults: { labelalign: 'top' }, ...
Comments
Post a Comment