修改Ext.form.Label的text

Label.text is just a config, not a property that can be set at runtime. It might be handy to have a setter function, but the lack of one is not a bug. You can do:

Ext.getCmp('infoCustomer').getEl().update('something else')
To "fix" it add this code before your code:

Ext.override(Ext.form.Label, {
    setText: function(t){
        this.text = t;
        if(this.rendered){
            this.el.update(t);
        }
    }
});
__________________
Brian Moeskau
Ext JS - Core Development Team

你可能感兴趣的:(修改Ext.form.Label的text)