试过写在doubleClick 事件中么?

解决方案 »

  1.   

    还是应该写在click事件当中,判断一下点中的是否是节点
    private TreeNode FindTreeNode(int x,int y)
    {
    Point pt=treeView1.PointToClient(new Point(x,y));
    TreeNode node=treeViewIni.TopNode;
    while(node!=null)
    {
      if(node.Bounds.Contains(pt))
      {
    return node;
      }
    node=node.NextVisibleNode;
    }
    return null;
      }
      

  2.   

    不是很明白你的意思
    是不是想展开节点,在展开后过虑掉不用的数据
    用BeforSelect 事件试试
      

  3.   

    谢谢,刚试了一下 
    在enter事件中也写上过滤代码就解决我的问题了