Class type Ext_form_field_Base.events


class type events = object .. end
Inherits
method specialkey : 'a.
(t Js.t -> Ext_EventObject.t Js.t -> 'a Js.t -> unit)
Js.callback Js.writeonly_prop

Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed. To handle other keys see Ext.util.KeyMap. You can check Ext.EventObject.getKey to determine which key was pressed. For example:

var form = new Ext.form.Panel({
    ...
    items: [{
            fieldLabel: 'Field 1',
            name: 'field1',
            allowBlank: false
        },{
            fieldLabel: 'Field 2',
            name: 'field2',
            listeners: {
                specialkey: function(field, e){
                    // e.HOME, e.END, e.PAGE_UP, e.PAGE_DOWN,
                    // e.TAB, e.ESC, arrow keys: e.LEFT, e.RIGHT, e.UP, e.DOWN
                    if (e.getKey() == e.ENTER) {
                        var form = field.up('form').getForm();
                        form.submit();
                    }
                }
            }
        }
    ],
    ...
});

Parameters:


method writeablechange : 'b.
(t Js.t -> bool Js.t -> 'b Js.t -> unit) Js.callback
Js.writeonly_prop

Fires when this field changes its read-only status.

Parameters: