Results 1 to 4 of 4

Thread: Grabbing items from a treeview

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2006
    Posts
    5

    Grabbing items from a treeview

    Hi all,
    I am trying to grab all of the items in a treeview and add them to a listbox in VB. I have no problem grabbing the items in a listbox via API starting off by using LB_GETCOUNT and adding them to a listbox in VB. But when I try to grab them from a treeview, LB_GETCOUNT returns 0 and I am guessing this is because a treeview is not the same as a listbox. Is there another constant or way of grabbing items from a treeview? Any help would be greatly appreciated. Thank you.

  2. #2

    Thread Starter
    New Member
    Join Date
    Oct 2006
    Posts
    5

    Re: Grabbing items from a treeview

    Nobody knows how to add items from a treeview into a listbox in VB?

  3. #3
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    Re: Grabbing items from a treeview

    Try TVM_GETITEM, TVM_SETITEM, and TVM_GETCOUNT

  4. #4

    Thread Starter
    New Member
    Join Date
    Oct 2006
    Posts
    5

    Re: Grabbing items from a treeview

    Thanks for your reply. Only one worked, so I did make some progress. Using TVM_GETCOUNT I was able to get the count of the items in the TreeView but I am still having trouble extracting them and adding them to a VB listbox. Any other suggestions anyone?

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