PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
treeview problem-VBForums
Results 1 to 4 of 4

Thread: treeview problem

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2007
    Posts
    44

    treeview problem

    hi

    how can I distinguish when the user clicking a node and when the user clicking the + sign of the node

    thanks

  2. #2
    PowerPoster
    Join Date
    Apr 2005
    Location
    Debug.Print
    Posts
    3,885

    Re: treeview problem

    Quote Originally Posted by yosilb
    hi

    how can I distinguish when the user clicking a node and when the user clicking the + sign of the node

    thanks
    i believe you would do that in the NodeMouseClick or NodeMouseDoubleClick event

    then in the event, you can do this to see if the node is expanded (-) or not expanded (+) like this
    vb Code:
    1. Private Sub TreeView1_NodeMouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles TreeView1.NodeMouseClick
    2.         If e.Node.IsExpanded Then ' (-)
    3.  
    4.         Else 'not expanded (+)
    5.  
    6.         End If
    7.     End Sub
    if you want to find the selected node, you would do
    vb Code:
    1. If e.Node.IsSelected Then
    2.  
    3.         End If

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2007
    Posts
    44

    Re: treeview problem

    thanks a lot. it really helps

  4. #4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width