Vcl.ComCtrls.TLVAdvancedCustomDrawSubItemEvent
Delphi
TLVAdvancedCustomDrawSubItemEvent = procedure(Sender: TCustomListView; Item: TListItem;
SubItem: Integer; State: TCustomDrawState; Stage: TCustomDrawStage;
var DefaultDraw: Boolean) of object;
C++
typedef void __fastcall (__closure *TLVAdvancedCustomDrawSubItemEvent)(TCustomListView* Sender, TListItem* Item, int SubItem, TCustomDrawState State, TCustomDrawStage Stage, bool &DefaultDraw);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
type typedef |
public | Vcl.ComCtrls.pas Vcl.ComCtrls.hpp |
Vcl.ComCtrls | Vcl.ComCtrls |
Description
TLVAdvancedCustomDrawItemEvent is a procedure called by the OnAdvancedCustomDrawSubItem event.
- The
Sender
parameter specifies the list view that owns the subitems.
- The
Item
parameter is the item being currently drawn.
- The
SubItem
parameter is the index of the subitem of that list item in its SubItems property.SubItem
is one-based, facilitating the call to some WinAPIs, such as GetSubItemRect. However, because SubItems is a TStrings and therefore zero-based, you must useSubItem
- 1.
- The
State
property indicates various attributes that can affect the way the subitem is drawn.
- The
Stage
property indicates the current stage in the painting process. Note that the cdPreErase and cdPostErase stages do not receive event notification. The background must be drawn when the item is rendered.
DefaultDraw
is only used whenStage
is cdPrepaint. SetDefaultDraw
to False to prevent the list view from adding the subitem's text after the event handler exits.