Vcl.ComCtrls.TCustomListView.OnDrawItem
Delphi
property OnDrawItem: TLVDrawItemEvent read FOnDrawItem write FOnDrawItem;
C++
__property TLVDrawItemEvent OnDrawItem = {read=FOnDrawItem, write=FOnDrawItem};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | protected | Vcl.ComCtrls.pas Vcl.ComCtrls.hpp |
Vcl.ComCtrls | TCustomListView |
Description
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.