Back to Devexpress

List of Custom Draw Events

windowsforms-5658-controls-and-libraries-tree-list-feature-center-appearances-and-look-and-feel-custom-drawing-list-of-custom-draw-events.md

latest4.8 KB
Original Source

List of Custom Draw Events

  • Feb 20, 2024
  • 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 EventDescription
TreeList.CustomDrawColumnHeaderEnables the column headers and column button to be custom painted.
TreeList.CustomDrawEmptyAreaEnables the empty area to be custom painted.
TreeList.CustomDrawFooterEnables the footer panel to be custom painted.
TreeList.CustomDrawFooterCellEnables the footer cells to be custom painted.
TreeList.CustomDrawNodeButtonEnables the node’s expand button to be custom painted.
TreeList.CustomDrawNodeCellEnables the data cells to be custom painted. Custom drawing is ignored for an active cell (with the active cell editor).
TreeList.CustomDrawNodeImagesEnables the node images to be custom painted.
TreeList.CustomDrawNodeIndentEnables node indents to be custom painted.
TreeList.CustomDrawNodeIndicatorEnables the indicator cells to be custom painted.
TreeList.CustomDrawNodePreviewEnables the node’s preview section to be custom painted.
TreeList.CustomDrawRowFooterEnables the group footer to be custom painted.
TreeList.CustomDrawRowFooterCellEnables 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

How to get colors that correspond to the currently used skin

How to obtain the color of a particular control's element when skins are used

How to get skin images at runtime