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.