Link Search Menu Expand Document

SSpread.EditMode Property

Set the input mode (edit mode of the text in the active cell).

Specify $TRUE to turn the input mode on and $FALSE to turn it off. The initial value is $FALSE.

Turn on the input mode
・ Key input on the cell
・ Double-click the cell
・ Set $TRUE for the EditMode property

Turn off the input mode
・ Press the Enter key
・ Another cell becomes active
・ Lose focus
・ Set $FALSE in the EditMode property

The EditModeOn event is fired when the input mode is ON, and the EditModeOff event is fired when the input mode is OFF.

Setting the EditModeReplace property, so that all cell contents can be selected when the input mode is turned on.

Setting the EditModePermanent property to $TRUE always turns on the input mode, so the EditMode property is disabled.

Focus mode and input mode

The SSpread object must be in focus for the input mode to turn on. Even if this property is set to $TRUE without focus, the input mode will not turn ON.

For example, if the button is clicked by writing the following in the OnTouch event of the Button class, the input mode will not be turned ON. This is because the focus moves to the button when the button is clicked.

Button Button1 {
    Function OnTouch(e) {
        ^.SSpread1.EditMode = $TRUE; /* Does not turn ON */
    }
}

As shown below, the result is the same even if the focus is set with the SetFocus method immediately before. This is because the focus is not changed when the SetFocus method is called. (The actual focus change is done after the OnTouch event handler ends)

Function OnTouch(e) {
    ^.SSpread1.SetFocus();
    ^.SSpread1.EditMode = $TRUE; /* Does not turn ON */
}

If you press the key specified in the Altkey property of the Button class to raise the Touch event, the focus will not move to the button. At this time, if the SSpread object has focus, the input mode will be ON.

Button Button1 {
    AltKey = $F06;
    Function OnTouch(e) {
        ^.SSpread1.EditMode = $TRUE; /* Turns on if SSpread has focus */
    }
}

Related Item
EditModePermanent, EditModeReplace property
EditModeOn, EditModeOff event