TreeView in Visual Basic.Net 2008

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • CAM

    TreeView in Visual Basic.Net 2008

    Hello,

    I created a Treeview which has several roots with child nodes. What I am
    trying to do is go to a form when the user press the third root and the
    first child. How do I code that? Any tips will be appreciated. Thank you
    in advance.

    Cheers

  • kimiraikkonen

    #2
    Re: TreeView in Visual Basic.Net 2008

    On Oct 14, 7:55 am, "CAM" <alex_marti...@ ca.rr.comwrote:
    Hello,
    >
    I created a Treeview which has several roots with child nodes.  What I am
    trying to do is go to a form when the user press the third root and the
    first child.  How do I code that?  Any tips will be appreciated.  Thank you
    in advance.
    >
    Cheers
    Assuming your child node is located under a root node, you can
    directly determine when child node is selected in TreeView's
    AfterSelect event:

    Private Sub TreeView1_After Select(ByVal sender As System.Object, _
    ByVal e As System.Windows. Forms.TreeViewE ventArgs) _
    Handles TreeView1.After Select
    If e.Node.Name = "child_node_nam e" Then
    <form_name>.Sho w()
    End If
    End Sub

    HTH,

    Onur Güzel

    Comment

    • CAM

      #3
      Re: TreeView in Visual Basic.Net 2008

      Thank you Kimiraikkonen, I was able to code and works great according to
      your tip. Again, I appreicate the help.

      Cheers

      "kimiraikko nen" <kimiraikkonen8 5@gmail.comwrot e in message
      news:b860ef4a-3589-461a-9add-fdbc0a906417@q3 5g2000hsg.googl egroups.com...
      On Oct 14, 7:55 am, "CAM" <alex_marti...@ ca.rr.comwrote:
      Hello,
      >
      I created a Treeview which has several roots with child nodes. What I am
      trying to do is go to a form when the user press the third root and the
      first child. How do I code that? Any tips will be appreciated. Thank you
      in advance.
      >
      Cheers
      Assuming your child node is located under a root node, you can
      directly determine when child node is selected in TreeView's
      AfterSelect event:

      Private Sub TreeView1_After Select(ByVal sender As System.Object, _
      ByVal e As System.Windows. Forms.TreeViewE ventArgs) _
      Handles TreeView1.After Select
      If e.Node.Name = "child_node_nam e" Then
      <form_name>.Sho w()
      End If
      End Sub

      HTH,

      Onur Güzel

      Comment

      Working...