That's completely correct, but the 'label' property is only available in Ext 3.0.1 and up.
So for older Ext versions you would use the code from post #7.
That's completely correct, but the 'label' property is only available in Ext 3.0.1 and up.
So for older Ext versions you would use the code from post #7.
Hi,
If you want to change the label in ExtJS 4, here are solutions
It is necessary to define an initial value for fieldLabel, can not be an empty string ( can)PHP Code:
Ext.override(Ext.form.Field, {
setFieldLabel : function(text) {
if (this.rendered) Ext.get(this.labelEl.id).update(text);
this.fieldLabel = text;
}
});
I think the method applyFieldLabel(value) should be overwritten... as explained in the article http://docs.sencha.com/ext-js/4-0/#!/guide/class_system
For ExtJS 4 user, you can replace label with labelEl, if you want to use this line of code.
replace with:Code:Ext.getCmp('field_id').label.update('text_to_change');
Code:Ext.getCmp('field_id').labelEl.update('text_to_change');
because, i tried with label and it not worked for me. but after replace label with labelEl, it works.![]()
Ext.getCmp('daterange').labelEl.update('Range '); works for me on Ext 4.0
thank you very much
I've tried this but it only fire once. Why is that?