Treeview Branch Item Recursion Loop

Post your working scripts, libraries and tools
icuurd12b42
Posts: 121
Joined: 14 Aug 2016, 04:08

Treeview Branch Item Recursion Loop

10 Sep 2017, 06:06

This recursive function iterates through the entire branch structure of the specified treeview item and fill up an array with all items contained under it which you can then loop through to perform actions on all the items in that branch

The array will not contain the start treeview item, only it's children items and sub branches will be in the array.

The array is superfluous as you could effect the items while in the recursive function, but this allows using the function in a generic way...

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Guest

Re: Treeview Branch Item Recursion Loop

10 Sep 2017, 06:49

Thanks for sharing.
An example would be nice.
Also, when it comes to Listviews and Treeviews, it's better to use LVM and TVM.
icuurd12b42
Posts: 121
Joined: 14 Aug 2016, 04:08

Re: Treeview Branch Item Recursion Loop

10 Sep 2017, 12:15

Guest wrote:Thanks for sharing.
An example would be nice.

Ok, not sure why you would ask as it's in there already


Also, when it comes to Listviews and Treeviews, it's better to use LVM and TVM.

Not sure what you imply here... I'll assume you mean TVM_GETNEXTITEM via SendMessage() to get the exact same data required for traversing the treeview items? Why is that better? The TV_GetChild and TV_GetNext already give that information.

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 20 guests