Back to Devexpress

TreeList.CustomDrawNodeCheckBox Event

windowsforms-devexpress-dot-xtratreelist-dot-treelist-8ee528fc.md

latest3.6 KB
Original Source

TreeList.CustomDrawNodeCheckBox Event

Enables you to manually paint node check boxes.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
[DXCategory("CustomDraw")]
public event CustomDrawNodeCheckBoxEventHandler CustomDrawNodeCheckBox
vb
<DXCategory("CustomDraw")>
Public Event CustomDrawNodeCheckBox As CustomDrawNodeCheckBoxEventHandler

Event Data

The CustomDrawNodeCheckBox event's data class is DevExpress.XtraTreeList.CustomDrawNodeCheckBoxEventArgs.

Remarks

The event parameter provides you all the information necessary to paint a node check box (see Node Checking - Checkboxes and Radio Buttons). The Node property returns the node currently being painted.

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

Important

Do not change cell values, modify the control’s layout, or change the control’s object model in the events used for custom control painting. Actions that update the layout can cause the control to malfunction.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CustomDrawNodeCheckBox event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-treelist-show-checkboxes-for-specific-level/CS/WindowsApplication1/Form1.cs#L54

csharp
_TreeList = treeList;
treeList.CustomDrawNodeCheckBox += treeList_CustomDrawNodeCheckBox;
treeList.BeforeCheckNode += treeList_BeforeCheckNode;

winforms-treelist-show-checkboxes-for-specific-level/VB/WindowsApplication1/Form1.vb#L50

vb
_TreeList = treeList
AddHandler treeList.CustomDrawNodeCheckBox, AddressOf treeList_CustomDrawNodeCheckBox
AddHandler treeList.BeforeCheckNode, AddressOf treeList_BeforeCheckNode

See Also

Node Checking - Checkboxes and Radio Buttons

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace