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

# TCustomTreeView.OnAdvancedCustomDraw

Event handler signalled to custom draw the grid control using drawing stages.

## Declaration

Source position: comctrls.pp line 3664

`protected property TCustomTreeView.OnAdvancedCustomDraw : TTVAdvancedCustomDrawEvent read FOnAdvancedCustomDraw write FOnAdvancedCustomDraw;`

## Description

OnAdvancedCustomDraw is a TTVAdvancedCustomDrawEvent property with the event handler signalled to paint the grid control. It is signalled (when assigned) from the CustomDraw method, and occurs when the control executes its Paint method.

Drawing Stages

cdPrePaint
  Paint the control when scrollbars are updated. Called after the OnCustomDraw event handler.
cdPostPaint
  Paint the control after borders have been drawn.
cdPreErase
  Not used in TCustomTreeView. The control does not receive erase notifications.
cdPostErase
  Not used in TCustomTreeView. The control does not receive erase notifications.

Use OnCustomDraw to paint the control when the drawing stage is cdPrePaint.

Use IsCustomDrawn to determine if a handler routine has been assigned to an event handler for a specific drawing target (the control or its items).