View Full Version : Is modification to inline text field possible?

16 Aug 2007, 6:52 AM

I find the inline textField extension (http://extjs.com/forum/showthread.php?t=7617) for forms very helpful, but I would like to modify it so that it's behavior is the same as the grid editor, i.e. becomes editable on double-click and becomes selected on click (or focus).

Basically I would like to modify
Ext.form.InlineTextField.prototype.onBlur = Ext.form.TextField.prototype.onBlur.createSequence(function() { to work on onDblClick, but there doesn't seem to be any onDblClick or onDoubleClick, etc. available.

To make it compatible with the grid editor, the onFocus should make the field blue (or the equivilent in whatever style is being used), the onDblClick should submit the data if its changed, and the onBlur should add the isdirty gif to the box if the data has changed.

I think this would be a useful modification to publish. Could anyone show me how to do this? The "prototype ...createSequence" stuff is a bit over my head.