Sign in Join
FPDoc Onlineexperiment

TCustomGrid.EditorByStyle function

Member of TCustomGridpublicIn unit Grids

Selects a cell Editor control with the specified style.

Declaration

pascal
function EditorByStyle(Style: TColumnButtonStyle): TWinControl
 ; virtual

Arguments

Style

Editor style which determines the editor control selected in the method.

Function result

Cell editor for the specified style, or Nil when an editor control is not used for the style.

Description

EditorByStyle is a TWinControl function used to select the control used as the Editor for a cell using the style in the Style argument.

Style contains a value from the TColumnButtonStyle enumeration, and determines which of the internal pre-allocated editors is used in the return value. Some of the values in Style do not require an editor control, like: cbsNone, cbsCheckboxColumn, and cbsButtonColumn. For these values, the return value is always Nil.

EditorByStyle is called from the GetDefaultEditor method when the grid allows editing (goEditing in Options) and the Column collection has been enabled in the control.

See also

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