TCustomComboBox.OnDrawItem property
Handler for special painting of an item (in owner-draw mode).
Declaration
property OnDrawItem: TDrawItemEvent read FOnDrawItem write FOnDrawItem;Description
OnDrawItem is a
TDrawItemEvent property which contains
an event handler used to draw an item in the drop-down list for the control.
OnDrawItem is used when
Style contains one of the owner-drawn
values. See
TComboBoxStyle for more information about the
owner-drawn styles available.
OnDrawItem is signalled (when assigned) from the DrawItem method.
The event handler is responsible for all drawing operations needed to render
the specified list item. This can include the text and any images or overlays
drawn for the list item. Use the Canvas property to render the
list item to the specified coordinate rectangle.
If OnDrawItem is not assigned, an internal default drawing routine is called to render the list item. It handles filling the canvas rectangle with the background for the item, and drawing the item text using the style, layout, and alignment defined in the control.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
