Sign in Join
FPDoc Onlineexperiment

TCustomTreeView.CustomDraw function

Member of TCustomTreeViewprotectedIn unit ComCtrls

Performs custom drawing using the assigned event handlers for the tree view control.

Declaration

pascal
function CustomDraw(const ARect: TRect; Stage: TCustomDrawStage)
: Boolean; virtual

Arguments

ARect

Bounds rectangle for the tree view control.

Stage

Drawing stage for the tree view control. cdPrePaint allows the OnCustomDraw event handler to be signalled.

Function result

True if default drawing must be performed by the tree view control. False if default drawing was performed in one of the event handlers.

Description

CustomDraw is a method used to perform custom drawing for the tree view using the event handlers assigned in the control. The OnCustomDraw or OnAdvancedCustomDraw event handlers are signalled depending on the drawing stage in Stage. OnCustomDraw is signalled only when Stage is set to cdPrePaint.

The return value is True if default drawing should be performed in the tree view control, and was not performed by event handlers in the control.

CustomDraw is called from the DoPaint method and occurs after values in the States property have been updated.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.