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

TCustomListView.OnCustomDrawItem

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

Declaration

Source position: comctrls.pp line 1607

protected property TCustomListView.OnCustomDrawItem : TLVCustomDrawItemEvent
  read FOnCustomDrawItem
  write FOnCustomDrawItem;

Description

OnCustomDrawItem is a TLVCustomDrawItemEvent property with the event handler used to perform custom drawing for a list item on a list view control. It is signalled (when assigned) from the CustomDrawItem method when the drawing stage is cdPrePaint, and occurs when the IntfCustomDraw method handles callbacks from the widgetset class instance.

Arguments to the event handler include the list view control, the list item drawn in the handler, and a variable parameter which indicates whether default drawing is handled in the list view control.

Use OnAdvancedCustomDrawItem to perform custom drawing for list items when the drawing stage is a value other than cdPrePaint.

Custom drawing event handlers are used when the IntfCustomDraw method handles callbacks from the widgetset class instance.

Use OnCustomDraw and OnAdvancedCustomDraw to perform custom drawing for the entire list view control.


Version 3.2 Generated 2024-02-25 Home