View Full Version : Icon after textfield

22 Sep 2010, 12:38 AM
I would like to develop a plugin (or something similar) to insert an icon after a text field (or a form field, in general). How can I insert an icon after them?

The idea is the same when msgTarget is set to 'side' and the error icon appears.

22 Sep 2010, 4:39 AM
You can create your plugin but you must to know that Ext.form.TriggerField do it for you ! (thanks extjs)

22 Sep 2010, 5:04 AM
Ok, but what happen if I want to use a Numberfield with its properties? I mean, I have a form with some numerical fields, and if I use a triggerField I lose maxValue, decimalPrecission, etc from numerical fields. Isn't it?

22 Sep 2010, 5:25 AM
Try this

Ext.ux.MyNumberField = Ext.extend(Ext.form.TriggerField, Ext.apply({}, Ext.form.NumberField));

22 Sep 2010, 5:55 AM
I tried it but now I have a problem with a FieldUnit plugin I use, where the unitText appears between the field and the end icon. Any idea?

The only thing I want to do is to show an icon where I display a help when mouse over...