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

# TCustomListView.OnAdvancedCustomDraw

Event handler signalled to custom draw the grid control when the draw state is not cdPrePaint.

## Declaration

Source position: comctrls.pp line 1620

`protected property TCustomListView.OnAdvancedCustomDraw : TLVAdvancedCustomDrawEvent read FOnAdvancedCustomDraw write FOnAdvancedCustomDraw;`

## Description

OnAdvancedCustomDraw is a TLVAdvancedCustomDrawEvent property with the event handler used to custom draw the grid control. It is signalled from the CustomDraw method when the draw stage is a value other than cdPrePaint, and occurs when the IntfCustomDraw method is called by the widgetset class instance.

Arguments to the event handler include:

Sender
  The TCustomListView for the event.
Item
  The list item drawn in the handler.
State
  The draw state for the list item.
Stage
  The draw stage for the list item. Will not contain the value cdPrePaint.
DefaultDraw
  Variable parameter which indicates if default drawing is performed by the list view control.

Use OnCustomDraw to custom draw the control when the draw stage is cdPrePaint.

Use OnCustomDrawItem and OnAdvancedCustomDrawItem to custom draw a list item on the control.

Use OnCustomDrawSubItem and OnAdvancedCustomDrawSubItem to custom draw a sub-item for a list item on the control.

## See also

TCustomListView.CustomDraw |  | Performs custom drawing in the specified rectangle and returns True on success.
TCustomListView.IntfCustomDraw |  | IntfCustomDraw - uses the interface to perform custom drawing
TCustomListView.OnCustomDraw |  | Event handler signalled to perform custom drawing for the list view control.
TCustomListView.OnCustomDrawItem |  | Event handler signalled to perform custom drawing for list items on the control.
TCustomListView.OnAdvancedCustomDrawItem |  | Event handler signalled to custom draw a list item on the grid control when the draw state is not cdPrePaint.
TCustomListView.OnCustomDrawSubItem |  | Event handler signalled to perform custom drawing for list sub-item on the control.
TCustomListView.OnAdvancedCustomDrawSubItem |  | Event handler signalled to custom draw list sub-items when the draw stage is not cdPrePaint.
TCustomListView.IsCustomDrawn |  | Returns True if a target is custom-drawn in the 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.