[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Grids' (#lcl)

TCustomGrid.SetEditText

Sets the value used in the cell Editor to the specified text.

Declaration

Source position: grids.pas line 1190

protected procedure TCustomGrid.SetEditText(

  ACol: LongInt;

  ARow: LongInt;

  const Value: string

); virtual;

Arguments

ACol

  

Column number for the editor value.

ARow

  

Row number for the editor value.

Value

  

New value for the cell Editor.

Description

Sets the text displayed in the Editor for the cell at the position specified in ACol and ARow to the given value.

SetEditText has an empty implementation in TCustomGrid. It is overridden in TCustomDrawGrid to signal the OnSetEditText event handler (when assigned).

SetEditText is used in KeyDown when the Escape key (VK_ESCAPE) is not handled by the grid control. It is called from the EditorGetValue method when a visible cell Editor is updated. It is called from EditorTextChanged method when the value in a cell Editor has been altered using the Change or Select methods in the editor control.


Version 4.0 Generated 2025-05-03 Home