List of Custom Draw Events

  • 2 minutes to read

You can handle custom draw events provided by the TreeList to paint the control's elements manually, or change the way the elements are painted by default.

Custom draw events are raised before tree list elements are painted. Each custom draw event handler receives a CustomDrawEventArgs descendant as a parameter whose properties specify the bounds of an element, the appearance settings used to paint the element, etc.

NOTE

Custom painting and alpha blending features are not applied to the printed and exported versions of the Tree List.

The following table lists the custom draw events provided by the Tree List control.

Custom Draw Event Description
TreeList.CustomDrawColumnHeader Enables the column headers and column button to be custom painted.
TreeList.CustomDrawEmptyArea Enables the empty area to be custom painted.
TreeList.CustomDrawFooter Enables the footer panel to be custom painted.
TreeList.CustomDrawFooterCell Enables the footer cells to be custom painted.
TreeList.CustomDrawNodeButton Enables the node's expand button to be custom painted.
TreeList.CustomDrawNodeCell Enables the data cells to be custom painted.
TreeList.CustomDrawNodeImages Enables the node images to be custom painted.
TreeList.CustomDrawNodeIndent Enables node indents to be custom painted.
TreeList.CustomDrawNodeIndicator Enables the indicator cells to be custom painted.
TreeList.CustomDrawNodePreview Enables the node's preview section to be custom painted.
TreeList.CustomDrawRowFooter Enables the group footer to be custom painted.
TreeList.CustomDrawRowFooterCell Enables the footer cells to be custom painted.

Each event also provides parameters that contain additional information that is specific to the element being painted. For example, when a summary footer cell is painted, the event parameter provides properties that allow the owning column, the type of applied summary and the display value to be obtained.

For information on how to use custom draw events, see Custom Draw Scenarios.

See Also