Vcl.ComCtrls.TListView.OnDrawItem

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnDrawItem;

C++

__property OnDrawItem;

Properties

Type Visibility Source Unit Parent
event published
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TListView

Description

Occurs when an item should be drawn in the list view.

Vcl.ComCtrls.TListView.OnDrawItem inherits from Vcl.ComCtrls.TCustomListView.OnDrawItem. All content below this line refers to Vcl.ComCtrls.TCustomListView.OnDrawItem.

Occurs when an item should be drawn in the list view.

Write code in an OnDrawItem handler to manually draw items in the list view. This event occurs only if OwnerDraw is True and ViewStyle is set to vsReport.

Note: List views receive several other custom draw events, including OnCustomDraw, OnCustomDrawItem, OnCustomDrawSubItem, OnAdvancedCustomDraw, OnAdvancedCustomDrawItem, and OnAdvancedCustomDrawSubItem. These other events, unlike OnDrawItem, occur regardless of the OwnerDraw property's value. They provide slightly different information about the state of the item to be drawn, and the OnAdvancedCustomDraw, OnAdvancedCustomDrawItem, or OnAdvancedCustomDrawSubItem event occurs at more points during the paint process.

OnDrawItem is an event handler of type Vcl.ComCtrls.TLVDrawItemEvent.

See Also