TDrawItemEvent procedure type
Specifies an event handler used to paint a single item in an owner-drawn list box or combo-box.
Declaration
TDrawItemEvent = procedure(Control: TWinControl; Index: Integer;
ARect: TRect; State: TOwnerDrawState)
of objectArguments
Control | The control for the owner-drawn operation. |
Index | Index of the list item to draw. |
ARect | The Canvas rectangle for the list item. |
State | Flags describing the drawing state for the list item. |
Description
TDrawItemEvent is an object procedure type which specifies an
event handler signalled to paint an single item in a owner-drawn list box or
combo-box control. Arguments passed to the event handler identify the
control, the index for the list item, the canvas coordinates, and the drawing
state for the operation. The event handler is responsible for rendering the
list item to its control in its entirety when the control uses owner-drawn
style settings.
TDrawItemEvent is the type used to implement the OnDrawItem
property in TCustomComboBox and TCustomListBox. An
application must implement and assign an object procedure using the signature
for the handler to respond to the event notification.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
