Results 1 to 2 of 2

Thread: Treeview Problems

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2000
    Location
    Christchurch, New Zealand
    Posts
    2

    Question

    How do I get the index number off treeview?

    I cant seem to access these numbers so that I can edit the properties of the data which corresponds to that selection.

    How do I do that?

    Also how do I sort the information so that all the information which is passed to the treeview is sorted alphabetically? this includes information such as names being automatically sorted once the information is passed to the tree.

    this is a problem since I want to do this for a program which will get the names of the people and then place them into a tree so that I can see what they have in their properties such as what they events which they have entered into etc.

    Can someone give a hand on this?

    Thanks
    Shane Rahui
    [email protected]

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Lightbulb

    1. TreeView has a NodeClick event which has Node object as an argument. This is an actual node object you clicked on:
    Code:
    Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
        MsgBox "You clicked on: " & Node.Text
    End Sub
    2. You can use Sorted property:
    Code:
    Private Sub Form_Load()
        TreeView1.Sorted = True
    End Sub

Posting Permissions

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



Click Here to Expand Forum to Full Width