Vcl.ComCtrls.TCustomListView.OnCustomDrawItem

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnCustomDrawItem: TLVCustomDrawItemEvent read FOnCustomDrawItem write FOnCustomDrawItem;

C++

__property TLVCustomDrawItemEvent OnCustomDrawItem = {read=FOnCustomDrawItem, write=FOnCustomDrawItem};

Properties

Type Visibility Source Unit Parent
event protected
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TCustomListView

Description

Occurs when an item in an owner-draw list view must be rendered.

Write code in an OnCustomDrawItem handler to draw individual items on the list view's canvas (using the Canvas property) before an item is painted.

Unlike the OnDrawItem event, the list view receives this event even if the OwnerDraw property is False. The OnCustomDrawItem event handler provides slightly different state information than the OnDrawItem event.

Note: OnCustomDrawItem occurs immediately prior to the rendering of each list item. To augment the default drawing process at other stages (such as after the list item is drawn), use the OnAdvancedCustomDrawItem event instead.

OnCustomDrawItem is an event handler of type Vcl.ComCtrls.TLVCustomDrawItemEvent.

See Also