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

TCustomDrawGrid.SetCheckboxState

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

Declaration

Source position: grids.pas line 1438

protected procedure TCustomDrawGrid.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

TCustomDrawGrid.ToggleCheckbox

  

Toggles the state for a check box cell between the checked and unchecked values.

TCustomDrawGrid.OnSetCheckboxState

  

Event handler signalled to set the state for a check box cell.

TCustomDrawGrid.DefaultDrawing

  

Indicates if the default drawing mechanism is used to draw the background and text for cells.

TCheckboxState


Version 4.0 Generated 2025-05-03 Home