-
4 Feb 2011 6:33 AM #11Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
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.
-
6 Jul 2011 8:50 AM #12
-
13 Oct 2011 4:16 AM #13
change fieldLabel in ExtJS 4
change fieldLabel in ExtJS 4
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;
}
});
-
1 Jan 2012 12:40 PM #14
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
-
5 Feb 2012 10:50 PM #15
-
8 Oct 2012 12:31 AM #16
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.


Reply With Quote

