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

TCustomDBGrid.DrawCheckboxBitmaps

Draws a check box bitmap for the specified Boolean column.

Declaration

Source position: dbgrids.pas line 450

protected procedure TCustomDBGrid.DrawCheckboxBitmaps(

  aCol: Integer;

  aRect: TRect;

  F: TField

);

Arguments

aCol

  

Column number to draw.

aRect

  

Canvas rectangle for the operation.

F

  

Field with data for the column.

Description

DrawCheckboxBitmaps is a procedure used to draw the check box bitmap for the specified column. DrawCheckboxBitmaps draws the check box bitmap only when the editor for the column is not visible; otherwise, no actions are performed in the method.

DrawCheckboxBitmaps examines the specified Field argument to ensure that it uses a Boolean data type. If the Field IsNull, the value cbGrayed is assigned to the aState argument. Otherwise, the TField.AsBoolean method is used to determine if aState is set to cbChecked or cbUnChecked. For Fields that do not use ftBoolean in the data type, the TField.AsString method is used to determine if the Field matches the value in TColumn.ValueChecked or TColumn.ValueUnChecked.

DrawCheckboxBitmaps signals the DrawCheckboxBitmaps event handler when it has been assigned in the control.

DrawCheckboxBitmaps calls the DrawGridCheckboxBitmaps method to render the check box bitmap with the necessary drawing state.


Version 3.2 Generated 2024-02-25 Home