Download CustomTreeViewLabelEditPart2.zip, last updated 28/10/2013 (14.07 KB)

Download
  • md5: 84276c0e1d02b4750fc1ecd76d71bedd
using System.ComponentModel;
using System.Windows.Forms;

namespace CustomTreeViewLabelEdit
{
  internal class NodeRequestTextEventArgs : CancelEventArgs
  {
    // Extending the LabelEdit functionality of a TreeView to include validation
    // http://cyotek.com/blog/extending-the-labeledit-functionality-of-a-treeview-to-include-validation

    #region Constructors

    public NodeRequestTextEventArgs(TreeNode node, string label)
      : this()
    {
      this.Node = node;
      this.Label = label;
    }

    protected NodeRequestTextEventArgs()
    { }

    #endregion

    #region Properties

    public string Label { get; set; }

    public TreeNode Node { get; protected set; }

    #endregion
  }
}

Donate

Donate