SpreadsheetCellField

Package: Libraries.Interface.Controls.Support · Inherits from: Libraries.Interface.Events.FocusListener, Libraries.Interface.Controls.Control, Libraries.Interface.Events.MouseMovementListener, Libraries.Interface.Item, Libraries.Interface.Item2D, Libraries.Language.Object, Libraries.Interface.Events.MouseListener, Libraries.Interface.Controls.TextField

The SpreadsheetCellField class is the text field a Spreadsheet places over a cell while the user edits it in place. Typing, the caret and the selection work as in any text field. Enter keeps the edit and moves down, Shift-Enter up, Tab right and Shift-Tab left; Escape cancels. Leaving the field another way, such as by clicking elsewhere, keeps the edit. Its name for screen readers is the cell's, such as "Cell C2". Each Spreadsheet makes its own, so most users won't need this class directly.

Example Code

use Libraries.Interface.Controls.Spreadsheet
use Libraries.Interface.Controls.Support.SpreadsheetCellField
Spreadsheet sheet
SpreadsheetCellField field = sheet:GetEditField()

Actions

GainedFocus(Libraries.Interface.Events.FocusEvent event)

This action is called when the field gets the focus. It does what a text field does; it is here because the field also overrides LostFocus, and TextField's focus actions come from more than one parent.

Parameters

GetSpreadsheet()

This action returns the field's spreadsheet.

Returns

Libraries.Interface.Controls.Spreadsheet: The spreadsheet.

LostFocus(Libraries.Interface.Events.FocusEvent event)

This action is called when the field loses the focus. If the spreadsheet is still editing, as when the user clicked somewhere else, the edit is kept.

Parameters

SetSpreadsheet(Libraries.Interface.Controls.Spreadsheet sheet)

This action connects the field to its spreadsheet. The Spreadsheet calls it.

Parameters

Inherited Actions

258 actions from Libraries.Interface.Controls.Control
74 actions from Libraries.Interface.Controls.TextField
1 action from Libraries.Interface.Events.MouseMovementListener
60 actions from Libraries.Interface.Item
201 actions from Libraries.Interface.Item2D
3 actions from Libraries.Language.Object