PDA

View Full Version : ?? triggerField ??



llwangyu
7 Mar 2011, 11:52 PM
"Ext.form.TriggerField" is extended from "Ext.form.Textfield"
but i want to use it extended from "Ext.form.TextArea",how can i do??

laurentParis
8 Mar 2011, 12:54 AM
I suggest to extend Ext.form.TriggerField with your own component... MyTextAreaWithTrigger
and set property


Ext.ux.MyTextAreaWithTrigger = Ext.extend(Ext.form.TriggerField, {
defaultAutoCreate : {
tag: "textarea",
style:"width:100px;height:60px;",
autocomplete: "off"
}
});


<<not try>>

llwangyu
8 Mar 2011, 6:28 PM
yes,it's ok.
thank u!!!