Sign in Join
FPDoc Onlineexperiment

TCustomDrawGrid.CellClick procedure

Member of TCustomDrawGridprotectedIn unit Grids

Performs actions to handle a mouse click in the specified cell.

Declaration

pascal
procedure CellClick(const aCol: Integer; const aRow: Integer; 
 const Button: TMouseButton); override

Arguments

aCol

Column number for the cell.

aRow

Row number for the cell.

Button

Mouse button for the click notification.

Description

CellClick is an overridden method used to handle a mouse click in the cell specified by the values in ACol and ARow. Button indicates the mouse button pressed for the click notification.

CellClick ensures that a left mouse button click causes the cell value in a column using the check box button style to be toggled. When Button contains mbLeft, the column is examined to determine if it uses the check box button style. When both conditions are met, the ToggleCheckbox method is called to update the cell value and display the correct bitmap for the check box state.

CellClick does not occur for a cell that is a fixed header for the column or the row.

CellClick is called from the MouseUp method when a mouse click occurs in a cell that has already been selected, or when AutoEdit has been enabled in the grid Options.

See also

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