Tree control node.
Inheritance: Control
コード例 #1
0
ファイル: TreeNode.cs プロジェクト: FloodProject/flood
        /// <summary>
        /// Adds a new child node.
        /// </summary>
        /// <param name="label">Node's label.</param>
        /// <returns>Newly created control.</returns>
        public TreeNode AddNode(string label)
        {
            TreeNode node = new TreeNode(this);
            node.Text = label;
            node.Dock = Pos.Top;
            node.IsRoot = this is TreeControl;
            node.TreeControl = m_TreeControl;

            if (m_TreeControl != null)
            {
                m_TreeControl.OnNodeAdded(node);
            }

            return node;
        }
コード例 #2
0
ファイル: TreeControl.cs プロジェクト: chartly/flood
 /// <summary>
 /// Handler for node added event.
 /// </summary>
 /// <param name="node">Node added.</param>
 public virtual void OnNodeAdded(TreeNode node)
 {
     node.LabelPressed += OnNodeSelected;
 }