Sign in Join
FPDoc Onlineexperiment

TCustomDrawGrid.SetCheckboxState procedure

Member of TCustomDrawGridprotectedIn unit Grids

Sets the value for a check box in the specified cell to a given state.

Declaration

pascal
procedure SetCheckboxState(const aCol: Integer; const aRow: Integer; 
 const aState: TCheckboxState); virtual

Arguments

aCol

Column number for the cell with the CheckBox.

aRow

Row number for the cell with the CheckBox.

aState

State value for the CheckBox.

Description

SetCheckboxState is a method used to set the checked, unchecked, or grayed state for a check box in the cell specified by ACol and ARow. AState contains the state value applied to the cell.

SetCheckboxState signals the OnSetCheckboxState event handler (when assigned) to perform the actions needed to change the value in the cell. If DefaultDrawing is enabled for the control, the InvalidateCell method is called and causes the cell to be redrawn.

No actions are performed in the method when OnSetCheckboxState has not been assigned.

SetCheckboxState is called from the ToggleCheckbox method to apply the new state value for the CheckBox.

See also

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