Sign in Join
FPDoc Onlineexperiment

TCustomGrid.SelectEditor procedure

Member of TCustomGridprotectedIn unit Grids

Gets the cell editor for the current cell, and sets its PopupMenu.

Declaration

pascal
procedure SelectEditor; virtual

Description

Calls GetDefaultEditor to retrieve the default Editor used for the column where the current cell is located (Col).

In situations where the current cell is not selectable in the grid, when FixedGrid is True as an example, the default cell Editor is set to Nil. The OnSelectEditor event handler is signalled (when assigned) to determine if a cell Editor (or none) is available for the editable column.

If an Editor has been assigned, but does not have a PopupMenu, the PopupMenu for the grid control is used in the Editor.

SelectEditor is called when goEditing is included in the Options for the grid control. It is also called when Options is configured to always display cell editors (goAlwaysShowEditor), and an editable non-fixed cell is selected in the MouseDown method. Similarly, it is called from MouseUp when a mouse click selects a new editable cell in the grid control.

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