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

TCustomComboBox.DrawItem

Draws a list item, using the OnDrawItem handler (when assigned).

Declaration

Source position: stdctrls.pp line 350

protected procedure TCustomComboBox.DrawItem(

  Index: Integer;

  ARect: TRect;

  State: TOwnerDrawState

); virtual;

Arguments

Index

  

The position for the item drawn in the method.

ARect

  

The area to paint on the Canvas.

State

  

The drawing state for the item (selected...).

Description

DrawItem is a procedure used to draw a list item defined in the Items property. DrawItem is called when the LM_DrawListItem message is handled for the control. Arguments passed to the method include the position in Items for the value drawn, the canvas rectangle where the drawing occurs, and the drawing state for the list item.

DrawItem signals the OnDrawItem handler (when assigned) to perform the drawing operation. Otherwise, default painting is performed by filling the background for the Canvas rectangle (if needed) and calling the InternalDrawItem routine.

See also

TCustomComboBox.OnDrawItem

  

Handler for special painting of an item (in owner-draw mode).

TDrawItemEvent

  

Specifies an event handler used to paint a single item in an owner-drawn list box or combo-box.

TOwnerDrawState

  

Alias for the TOwnerDrawState type in lcltype.pp.

TRect


Version 3.2 Generated 2024-02-25 Home