Skip to main content

TcxCustomListView.OnCustomDrawSubItem Event

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

Declaration

property OnCustomDrawSubItem: TLVCustomDrawSubItemEvent read; write;

Remarks

The OnAdvancedCustomDrawSubItem event fires for each individual sub-item of the control’s items before its default painting takes place.

The Sender parameter of the event specifies the control whose sub-item is being painted. Use the Canvas property of the object representing this parameter to obtain the canvas used to paint. The Item parameter enables you to determine the currently processed item. Use it to get the bounding rectangle of the item (the DisplayRect method) and other information needed when painting (caption text, image indexes, etc). The State parameter can be used to determine the state of the painted item. The cdsSelected and cdsHot values included into this parameter’s value indicate that the item is selected or hot-tracked respectively.

See Also