日期:2014-05-16 浏览次数:20466 次
newTextField = Ext.extend(Ext.form.TextField, {
unitText : '',
onRender : function(ct, position) {
newTextField.superclass.onRender.call(this, ct, position);
if (this.unitText != '') {
this.unitEl = ct.createChild({
tag : 'div',
html : this.unitText
});
this.unitEl.addClass('x-form-unit');
}
},
setUnitText : function(v){
this.unitEl.set({html:v});
}
});
Ext.reg('myTextField', newTextField);