Vcl.ComCtrls.TLVAdvancedCustomDrawSubItemEvent
C++
typedef void __fastcall (__closure *TLVAdvancedCustomDrawSubItemEvent)(TCustomListView* Sender, TListItem* Item, int SubItem, TCustomDrawState State, TCustomDrawStage Stage, bool &DefaultDraw);
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| typedef | public | Vcl.ComCtrls.hpp | Vcl.ComCtrls | Vcl.ComCtrls |
Description
TLVAdvancedCustomDrawItemEvent is a procedure called by the OnAdvancedCustomDrawSubItem event.
- The
Senderparameter specifies the list view that owns the subitems.
- The
Itemparameter is the item being currently drawn.
- The
SubItemparameter is the index of the subitem of that list item in its SubItems property.SubItemis 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
Stateproperty indicates various attributes that can affect the way the subitem is drawn.
- The
Stageproperty 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.
DefaultDrawis only used whenStageis cdPrepaint. SetDefaultDrawto False to prevent the list view from adding the subitem's text after the event handler exits.