如题

解决方案 »

  1.   

    我想要双击treeview的子nodes触发事件而不是单击,单击的我会了:
    Private Sub DTTreeView1_Nodeclick(ByVal Node As ComctlLib.Node)
        If DTTreeView1.Nodes(6).Selected Then
            LTWebBrowser1.Navigate ("http://bbs.cctvgame.com")
        End If
            End Sub
      

  2.   

    treeview有双击事件但是不是他要的效果.
      

  3.   

    Private Sub Form_Load()
        With TreeView1
            .LineStyle = tvwTreeLines
            .PathSeparator = "\"
            .FullRowSelect = True
            .Style = tvwTreelinesPlusMinusText
        End With
        Dim Root As Node
        'Add some items
        With TreeView1.Nodes
            Set Root = .Add(, , , "Top-level Node #1")
            .Add Root.Index, tvwChild, , "Child Node #1"
            .Add Root.Index, tvwChild, , "Child Node #2"
            .Add Root.Index, tvwChild, , "Child Node #3"
            Set Root = .Add(, , , "Top-level Node #2")
            .Add Root.Index, tvwChild, , "Child Node #1"
            .Add Root.Index, tvwChild, , "Child Node #2"
            .Add Root.Index, tvwChild, , "Child Node #3"
            Set Root = .Add(, , , "Top-level Node #3")
            .Add Root.Index, tvwChild, , "Child Node #1"
            .Add Root.Index, tvwChild, , "Child Node #2"
            .Add Root.Index, tvwChild, , "Child Node #3"
            Set Root = .Add(, , , "Top-level Node #4")
            .Add Root.Index, tvwChild, , "Child Node #1"
            .Add Root.Index, tvwChild, , "Child Node #2"
            .Add Root.Index, tvwChild, , "Child Node #3"
        End With
    End SubPrivate Sub TreeView1_DblClick()
        Dim nodex As Node
        Set nodex = TreeView1.SelectedItem   'SelectedItem为当前选中的节点
        
        MsgBox nodex.FullPath
    End Sub
      

  4.   

    终于看懂了,说了这么多原来就('SelectedItem为当前选中的节点)
    这句最有用。
      

  5.   

    写了那么多就为了告诉你 'SelectedItem为当前选中的节点  :P