Quantcast
Channel: The Old New Thing
Viewing all articles
Browse latest Browse all 3085

How can I move an HTREEITEM to a new parent?

$
0
0

Suppose you have a TreeView control, and you created an item in it, and you want to move the HTREEITEM to a new parent. How do you do that?

You can't, at least not all in one motion.

You will have to delete the HTREEITEM and then re-create it in its new location.

If you want to move an HTREEITEM within the same parent (say, to reorder it among its siblings), then you can use Tree­View_Sort­Children­CB and pass a custom sort function that rearranges the children into the order you want.


Viewing all articles
Browse latest Browse all 3085

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>