示例#1
0
        // Set a tool tip if the mouse is over a valid node
        private void FileTree_MouseMove(object sender, MouseEventArgs e)
        {
            var theNode = FileTree.GetNodeAt(e.X, e.Y);

            if (theNode != null && theNode.Tag != null)
            {
                if (theNode.Tag.ToString() != ToolTip.GetToolTip(FileTree))
                {
                    ToolTip.SetToolTip(FileTree, theNode.Tag.ToString());
                }
            }
            else
            {
                ToolTip.SetToolTip(FileTree, "");
            }
        }
示例#2
0
 private void FileTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     FileTree.SelectedNode = FileTree.GetNodeAt(e.Location);
 }