Sign in Join
FPDoc Onlineexperiment

TCustomListView.CustomDraw function

Member of TCustomListViewprotectedIn unit ComCtrls

Performs custom drawing in the specified rectangle and returns True on success.

Declaration

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

Arguments

ARect

Bounds rectangle for the drawing operation.

AStage

Drawing stage for the control. Affects the OnCustomDraw event handler.

Function result

True if default drawing should be performed in the list view control. False is default drawing was handled in an event handler and can be skipped by the control.

Description

CustomDraw draws the list view control using the OnCustomDraw or OnAdvancedCustomDraw event handlers. OnCustomDraw is signalled (when assigned) if the drawing stage in AStage is cdPrePaint. OnAdvancedCustomDraw is signalled (when assigned).

The default return value is True, but may be modified in the event handlers if it is not able to render the control in the handler routine.

Use OnDrawItem and OnAdvancedCustomDrawItem to draw an individual list item on the control.

CustomDraw is called from the IntfCustomDraw method and occurs when the widgetset class instance redraws the LCL control.

See also

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