Unit 'Grids' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#lcl]

TCustomGrid.GetImageForCheckBox

Gets the bitmap used to draw Checkbox columns in the grid.

Declaration

Source position: grids.pas line 1080

protected procedure TCustomGrid.GetImageForCheckBox(

  const aCol: Integer;

  const aRow: Integer;

  CheckBoxView: TCheckBoxState;

  var ImageList: TCustomImageList;

  var ImageIndex: Integer;

  var Bitmap: TBitmap

); virtual;

Arguments

aCol

  

Column number for the Checkbox cell.

aRow

  

Row number for the Checkbox cell.

CheckBoxView

  

Checkbox state for the cell.

ImageList

  

Image list with images used for Checkbox drawing states.

ImageIndex

  

Ordinal position of the image used for the corresponding Checkbox state.

Bitmap

  

Bitmap with the image drawn for the Checkbox state.

Description

GetImageForCheckBox signals the OnUserCheckboxBitmap event handler (when assigned) to get a bitmap used for the checkbox state. If a valid TBitmap instance is not assigned in the event handler, the OnUserCheckBoxImage event handler is signalled (when assigned) to get the TImageList, TBitmap, and ImageIndex used for the purpose.

GetImageForCheckBox is used in the implementation of the DrawGridCheckboxBitmaps and DrawCellText methods in TCustomGrid.

See also

TCustomGrid.OnUserCheckboxBitmap

  

Event handler signalled to get the user-defined bitmap used for a checkbox cell.

TCustomGrid.OnUserCheckboxImage

  

Event handler signalled to get the user-defined image used for a checkbox cell.

TCustomGrid.DrawGridCheckboxBitmaps

  

Draws a checkbox bitmap which represents the given state in a cell.

TCustomGrid.DrawCellText

  

Draws the specified text in the given text rectangle.