Link Search Menu Expand Document

SSpread.BeforeEditMode Event

Occurs just before the edit mode starts.

The following child objects are attached to the Event object.

Type Name Description
Number Col Column number of the cell that switches to edit mode
Number Row Row number of cell to switch to edit mode
Number UserAction User action
The following values are set.
Constant Value Description
$BeforeEditModeKeyboard 0 Switch to edit mode by key operation
$BeforeEditModeMouse 1 Switch to edit mode by operating the mouse
$BeforeEditModeCode 2 Switch to edit mode by code

The EditModeOn event is fired when the edit mode starts, and the EditModeOff event is fired when the edit mode is finished.

Example of usage

Function OnBeforeEditMode (e) {
    var what;
    switch (e.UserAction) {
        case $ BeforeEditModeKeyboard:
            what = " key operation ";
            break;
        case $ BeforeEditModeMouse:
            what = " mouse operation ";
            break;
        case $ BeforeEditModeCode:
            what = " code ";
            break;
    }
    print (e.Col, e.Row, what, "\ n");
}

Related Item
EditModeOff, EditModeOn event