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

# TCustomListView.OnCustomDraw

Event handler signalled to perform custom drawing for the list view control.

## Declaration

Source position: comctrls.pp line 1617

`protected property TCustomListView.OnCustomDraw : TLVCustomDrawEvent read FOnCustomDraw write FOnCustomDraw;`

## Description

OnCustomDraw is a TLVCustomDrawEvent property with the event handler signalled when a custom draw operation is handled by the LCL interface. It is signalled from the CustomDraw method when the drawing stage for the control is cdPrePaint.

Arguments to the event handler include the control, the display rectangle for the operation, and a variable parameter that indicates whether default drawing is performed by the list view control.

OnCustomDraw occurs when the widgetset class for the control calls the IntfCustomDraw method and the list view control is the draw target.

Use OnAdvancedCustomDraw to perform custom drawing when the drawing state has a value other than cdPrePaint.

Use OnCustomDrawItem and OnAdvancedCustomDrawItem to perform custom drawing for the list items on the control.

Use OnCustomDrawSubItem and OnAdvancedCustomDrawSubItem to perform custom drawing for the list sub-items on the control.

## See also

TCustomListView.CustomDraw |  | Performs custom drawing in the specified rectangle and returns True on success.
TCustomListView.OnAdvancedCustomDraw |  | Event handler signalled to custom draw the grid control when the draw state is not cdPrePaint.
TCustomListView.IsCustomDrawn |  | Returns True if a target is custom-drawn in the control.
TCustomListView.IntfCustomDraw |  | IntfCustomDraw - uses the interface to perform custom drawing
TLVCustomDrawEvent |  | Specifies an event handler signalled to custom draw a list view control.
TCustomDrawStage |  | TCustomDrawStage a series of constants to define the drawing stages for custom-drawn controls.
TCustomDrawTarget |  | TCustomDrawTarget - enumerated type controlling how a target object is drawn.