Sign in Join
FPDoc Onlineexperiment

TCustomDrawGrid.GetEditText function

Member of TCustomDrawGridprotectedIn unit Grids

Gets the text displayed in the Editor for the specified cell.

Declaration

pascal
function GetEditText(aCol: LongInt; aRow: LongInt): string; override

Arguments

aCol

Column number for the cell.

aRow

Row number for the cell.

Function result

Text used as the value in the Editor control.

Description

GetEditText is an overridden method used to get the text displayed in the Editor for the specified cell. GetEditText signals the OnGetEditText event handler (when assigned) to get the text displayed in the Editor. The return value can be an empty string ('') when:

  • OnGetEditText is not assigned.
  • The cell at ACol and ARow is empty.
  • Or, a value in ACol or ARow is not valid for the grid.

GetEditText is called from the EditorDoSetValue method when TGridMessages are dispatched to the Editor to set the edit mask and value used in the control.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.