Results 1 to 3 of 3

Thread: Treeview control

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Location
    France
    Posts
    1
    I tried to use the treeview control. I added several nodes to the treeview control and then removed all the nodes using the Remove method. But when I tried to add newer nodes, an error message appeared : "Key non unique in the collection" whereas I created a new key ! What happened ?


    Thanks !

  2. #2
    Lively Member bhaskerg's Avatar
    Join Date
    Mar 2001
    Location
    india
    Posts
    68

    Talking

    can u paste the code please !!!!

  3. #3
    Hyperactive Member mvrp350's Avatar
    Join Date
    Feb 2001
    Location
    Best, the Netherlands
    Posts
    322
    Make sure the key is unique i.e. place a counter:

    to add a node:

    private sub
    dim i as integer

    i = 1

    more code .......


    Set mNode = tvw1.Nodes.Add(relative, tvwChild, i, Text)
    i = i+1

    end sub

    maybe it's required to declare your integer as public or global, depending on the rest of your code

    Good luck

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