Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Custom Draw

  • 2 minutes to read

This topic describes custom draw events used to manually paint the tree list’s visual elements.

The following image shows the tree list’s content:

All events provide a unified parameter list to facilitate coding. This includes:

Sender – specifies the tree list.

ViewInfo – provides ViewInfo information used to paint elements. Generally, you will only need to use a few properties of ViewInfo. The other properties are used by the control for internal purposes.

The most frequently used ViewInfo properties include:

  • BoundsRect – provides the coordinates of the element’s bounding rectangle.

  • ViewParams – specifies the style settings.

ACanvas – specifies the drawing surface on which a tree list element is painted. Since this parameter specifies the control’s canvas, use the AViewInfo.BoundsRect property instead, to determine the element’s bounding rectangle.

ADone – specifies whether default painting is required. If ADone is True, the default code is not executed.

#Task-Based Help