Draw Tree Node Extended Event Args Class
This is used to provide information for the ExtendedTreeView events
TreeNodeDrawing and TreeNodeDrawn.
Definition
Namespace: EWSoftware.ListControls
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2024.12.31.0
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2024.12.31.0
C#
public class DrawTreeNodeExtendedEventArgs : EventArgs,
IDisposableVB
Public Class DrawTreeNodeExtendedEventArgs
Inherits EventArgs
Implements IDisposableC++
public ref class DrawTreeNodeExtendedEventArgs : public EventArgs,
IDisposableF#
type DrawTreeNodeExtendedEventArgs =
class
inherit EventArgs
interface IDisposable
end- Implements
- IDisposable
Remarks
When assigning new graphics objects to the event arguments, any old graphics object is disposed
of automatically. Likewise, the objects are disposed of when the event arguments are disposed of after
the draw events.
Example
See DrawTreeNodeExtendedEventArgs(Graphics, TreeNode, TreeNodeStates, Rectangle)
for an example of custom drawing the tree nodes.
Constructors
| DrawTreeNodeExtendedEventArgs | Constructor |
Properties
| BackgroundBrush | This is used to set or get the brush used to draw the node's background |
| ExpandoBounds | This is used to set or get the bounds of the expando image (+/-) if it is drawn |
| Font | This is used to set or get the font used to draw the node text |
| Graphics | This read-only property returns the graphics object |
| ImageBounds | This is used to set or get the bounds of the node image if it is drawn |
| ImageIndex | This is used to set or get the index of the image to draw on the node from the tree view's ImageList. |
| LinePen | This is used to set or get the pen used to draw the node lines |
| LinePosition | This is used to set or get the X coordinate of the inner most node line |
| LineWidth | This is used to set or get the width of the horizontal line connecting the vertical node line to the node image or text. |
| Node | This read-only property returns the tree node being drawn |
| NodeBounds | This read-only property returns the overall bounds of the node to draw |
| NodeParts | This is used to set or get the parts of the node to draw |
| State | This read-only property returns the current state of the tree node to draw |
| StateBounds | This is used to set or get the bounds of the checkbox or state image if it is drawn |
| StateImageIndex | This is used to set or get the index of the state image to draw on the node from the tree view's StateImageList. |
| StringFormat | This is used to set or get the string format to use when drawing the text |
| Text | This is used to set or get the text to draw for the node |
| TextBackgroundBrush | This is used to set or get the brush used to draw the node text's background if FullRowSelect is set to false. |
| TextBounds | This is used to set or get the bounds of the node text |
| TextForegroundBrush | This is used to set or get the brush used to draw the node's foreground text |
Methods
| Dispose | This implements the Dispose() interface to properly dispose of the event arguments object |
| Dispose(Boolean) | This can be overridden by derived classes to add their own disposal code if necessary |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Finalize |
This handles garbage collection to ensure proper disposal of the event arguments if not done
explicitly with Dispose.
(Overrides ObjectFinalize) |
| GetHashCode | Serves as the default hash function. (Inherited from Object) |
| GetType | Gets the Type of the current instance. (Inherited from Object) |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
| ToString | Returns a string that represents the current object. (Inherited from Object) |