private TreeNodeEx FindChildAtPoint(TreeNodeCollectionEx nodes, ref int currentPosition, Drawing.Point p) { foreach (TreeNodeEx node in nodes) { if (node.Visible) { currentPosition += this.HeightIndent + this.Font.Height; if (currentPosition > p.Y) { return(node); } if (node.Expanded) { TreeNodeEx node2 = FindChildAtPoint(node.Nodes, ref currentPosition, p); if (node2 != null) { return(node2); } } } } return(null); }
public TreeViewEx() { this.nodes = new TreeNodeCollectionEx(this); // initialise scroll bar this.vScrollBar = new WinForms.VScrollBar(); this.vScrollBar.Minimum = this.vScrollBar.Maximum = 0; this.vScrollBar.Dock = WinForms.DockStyle.Right; this.vScrollBar.Visible = false; this.vScrollBar.Scroll += new WinForms.ScrollEventHandler(OnVerticalScroll); this.Controls.Add(vScrollBar); // initialise tool tip this.toolTip = new WinForms.ToolTip(); this.toolTip.Active = true; this.AllowDrop = this.AllowMovementOfNodes; this.SetStyle(WinForms.ControlStyles.DoubleBuffer | WinForms.ControlStyles.UserPaint | WinForms.ControlStyles.AllPaintingInWmPaint, true); this.BackColor = Drawing.Color.White; }
public TreeViewEx() { this.nodes = new TreeNodeCollectionEx(this); // initialise scroll bar this.vScrollBar = new WinForms.VScrollBar(); this.vScrollBar.Minimum = this.vScrollBar.Maximum = 0; this.vScrollBar.Dock = WinForms.DockStyle.Right; this.vScrollBar.Visible = false; this.vScrollBar.Scroll += new WinForms.ScrollEventHandler(OnVerticalScroll); this.Controls.Add( vScrollBar ); // initialise tool tip this.toolTip = new WinForms.ToolTip(); this.toolTip.Active = true; this.AllowDrop = this.AllowMovementOfNodes; this.SetStyle(WinForms.ControlStyles.DoubleBuffer | WinForms.ControlStyles.UserPaint | WinForms.ControlStyles.AllPaintingInWmPaint, true); this.BackColor = Drawing.Color.White; }
public TreeNodeCollectionExEnumerator(TreeNodeCollectionEx collection) { this.collection = collection; }
public TreeNodeEx() { this.nodes = new TreeNodeCollectionEx(this); }
private TreeNodeEx FindChildAtPoint(TreeNodeCollectionEx nodes, ref int currentPosition, Drawing.Point p) { foreach (TreeNodeEx node in nodes) { if (node.Visible) { currentPosition += this.HeightIndent + this.Font.Height; if (currentPosition > p.Y) return node; if (node.Expanded) { TreeNodeEx node2 = FindChildAtPoint(node.Nodes, ref currentPosition, p); if (node2 != null) return node2; } } } return null; }