TCustomCheckCombo.DrawItem procedure
Draws a check box item defined in the combo-box control.
Declaration
procedure DrawItem(Index: Integer; ARect: TRect; State: TOwnerDrawState)
; overrideArguments
Index | Ordinal position for the check box drawn in the method. |
ARect | Rectangle with the coordinates for the check box drawn in the method. |
State | Owner draw state for the check box. |
Description
DrawItem is an overridden procedure used to draw a check box
defined in the Items for the control.
Index contains the ordinal position for the
TComboExItem instance in
ItemsEx that is drawn in the
method.
ARect is the rectangle with the coordinates for the check box item
drawn in the method. The values in ARect are set in the calling procedure
(LMDrawListItem in TCustomComboBox).
State contains the owner draw state used to render the check box
item, and determines the window and font colors for the check box.
DrawItem uses ThemeServices to get theme element details applied
to check box items in the combo-box. DrawItem ensures that a valid text
height is available for the control Canvas, and is used to draw
the text for the check box.
DrawItem configures the Canvas to use the brush style and font color needed
for the value in State. Text drawing flags are derived for the item, and the
text is rendered by calling the DrawText method.
TCustomComboBox or trigger its OnDrawItem event
handler. The item is rendered entirely in this method.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
