Skip to main content
A newer version of this page is available. .

TreeList.CustomDrawNodeImages Event

Provides the ability to perform custom painting of node state and select images.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v19.1.dll

Declaration

[DXCategory("CustomDraw")]
public event CustomDrawNodeImagesEventHandler CustomDrawNodeImages

Event Data

The CustomDrawNodeImages event's data class is CustomDrawNodeImagesEventArgs. The following properties provide information specific to this event:

Property Description
Appearance Gets the painted element’s appearance settings. Inherited from CustomDrawEventArgs.
Bounds Gets the painted element’s bounding rectangle. Inherited from CustomDrawEventArgs.
Cache Gets an object specifying the storage for the most used pens, fonts and brushes. Inherited from CustomDrawEventArgs.
Graphics Gets an object used to paint. Inherited from CustomDrawEventArgs.
Handled Gets or sets a value specifying whether an event was handled and that the default element painting is therefore not required. Inherited from CustomDrawEventArgs.
IsRightToLeft Gets a value indicating whether the TreeList’s elements are aligned to support locales using right-to-left fonts. Inherited from CustomDrawEventArgs.
ObjectArgs Gets an object containing information about the painted element. Inherited from CustomDrawEventArgs.
Painter Gets the painter object that provides the default element’s painting mechanism. Inherited from CustomDrawEventArgs.
SelectImageIndex Gets or sets the index of the image displayed within the painted node when it is focused.
SelectImageLocation Gets the location of the select image’s top-left corner.
SelectRect Gets the bounding rectangle of the select image.
StateImageIndex Gets or sets the index of the state image displayed within the node.
StateImageLocation Gets the location of the state image’s top-left corner.
StateRect Gets the bounding rectangle of the state image.

The event data class exposes the following methods:

Method Description
DefaultDraw() Performs default painting of an element. Inherited from CustomDrawEventArgs.

Remarks

The CustomDrawNodeImages event fires for each node within the TreeList and provides all the information needed to paint node images.

See the Custom Draw Scenarios topic for information on using custom draw events.

Important

Never change cell values or modify the control’s layout on this event, or any other event designed to tune the control’s appearance. Any action that causes a layout update can cause the control to malfunction.

See Also