Esempio n. 1
0
    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);
    }
Esempio n. 2
0
    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;
    }
Esempio n. 3
0
    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;
    }
Esempio n. 4
0
 public TreeNodeCollectionExEnumerator(TreeNodeCollectionEx collection)
 {
     this.collection = collection;
 }
 public TreeNodeCollectionExEnumerator(TreeNodeCollectionEx collection)
 {
     this.collection = collection;
 }
Esempio n. 6
0
 public TreeNodeEx()
 {
     this.nodes = new TreeNodeCollectionEx(this);
 }
Esempio n. 7
0
    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;
    }
Esempio n. 8
0
 public TreeNodeEx()
 {
     this.nodes = new TreeNodeCollectionEx(this);
 }