DrawTreeNodeEventArgs(Graphics, TreeNode, Rectangle, TreeNodeStates) Constructor

Definition

Initializes a new instance of the DrawTreeNodeEventArgs class.

C#
public DrawTreeNodeEventArgs(System.Drawing.Graphics graphics, System.Windows.Forms.TreeNode node, System.Drawing.Rectangle bounds, System.Windows.Forms.TreeNodeStates state);
C#
public DrawTreeNodeEventArgs(System.Drawing.Graphics graphics, System.Windows.Forms.TreeNode? node, System.Drawing.Rectangle bounds, System.Windows.Forms.TreeNodeStates state);

Parameters

graphics
Graphics

The Graphics surface on which to draw.

node
TreeNode

The TreeNode to draw.

bounds
Rectangle

The Rectangle within which to draw.

state
TreeNodeStates

A bitwise combination of the TreeNodeStates values indicating the current state of the TreeNode to draw.

Exceptions

.NET 6 and later versions: graphics is null.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10