PDA

View Full Version : add a new property to my custom component



abdelaat
26 Oct 2010, 3:07 AM
Hi,
I would extend the TextField class and i want to add some propeties that are not defined by the TextField class like that :



Ext.ux.MyTextField = Ext.extend(Ext.form.TextField, {
MyNewProperty:'new property',
initComponent:function()
{
// call parent initComponent
Ext.ux.ScoolTextField.superclass.initComponent.call(this);
}

});
When i instantiate the MyTextField i see that there is no property called "MyNewProperty", can you tell me how can i do that?