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

# TCustomListView.CustomDrawItem

Custom draws the specified item and returns True on success.

## Declaration

Source position: comctrls.pp line 1553

`protected function TCustomListView.CustomDrawItem(`
`AItem: TListItem;`
`AState: TCustomDrawState;`
`AStage: TCustomDrawStage`
`):Boolean; virtual;`

## Arguments

`AItem` |  | List item drawn using the event handlers for the control.
`AState` |  | Drawing state for the list item (Selected, Focused, Disabled, et. al.).
`AStage` |  | Drawing stage for the list item. A value other than cdPrePaint causes the advanced event handler to be used.

## Function result

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

## Description

CustomDrawItem draws an item on the list view control using the OnCustomDrawItem or OnAdvancedCustomDrawItem event handlers (when assigned).