Vcl.ComCtrls.TLVAdvancedCustomDrawSubItemEvent

From RAD Studio API Documentation
Jump to: navigation, search

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 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 use SubItem - 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 when Stage is cdPrepaint. Set DefaultDraw to False to prevent the list view from adding the subitem's text after the event handler exits.

See Also