Typically, when the end user double-clicks in the cell, the editor control is made available and the user can type in the cell. This ability to edit in a cell is called edit mode. Several properties and methods can customize the use of edit mode.
When the cell is in edit mode, the active cell typically displays a flashing I-beam cursor, as shown in the figure below. When the cell is not in edit mode, the active cell typically displays a focus rectangle, also as shown.
Cell in edit mode | Cell selected but not in edit mode |
A cell enters edit mode (edit mode is turned on) when
- the user starts typing in the cell
- the user double-clicks the cell
- the EditMode property is set to true
A cell leaves edit mode (edit mode is turned off) when
- the user presses the Enter key
- the user activates a different cell
- the application loses the focus
- the EditMode property is set to false
When a cell enters edit mode, by default the cursor is positioned at the end of the existing text in the cell. You can change it to select the existing text in the cell by setting the EditModeReplace property.
If you prefer, you can specify that a cell is always in edit mode when it becomes the active cell using the EditModePermanent property.
When a cell enters edit mode, the EditModeOn event occurs; when a cell leaves edit mode, the EditModeOff event occurs.
(You can set the position of the pointer in the edit control when it receives the focus by using the SuperEditBase.EditModeCursorPosition property).
You can start and stop edit mode by using the StartCellEditing and StopCellEditing methods.
Using the Spread Designer
- Select the Settings menu.
- Select the Edit option (Spread settings section).
- Check the Cells Always in EditMode option for EditModePermanent or Editing Replaces Existing Text for EditModeReplace.
- Use the File menu, then Apply and Exit to save the changes.