Search code examples
treeviewwxwidgetsreparenting

Is it possible to re-parent a wxTreeItem or wxTreeListItem?


This question regards wxWidgets (v3.1.3).

Suppose you have an item in the tree, either made with InsertItem or AppendItem. Is it possible to move this item to another location in the tree (possibly even different parent node), without having to delete it and all its children and recreate a duplicate subtree?

Please answer only for trees without user specified data model.


Solution

  • Short answer is 'no'. You can only recreate the the node in the new location using the label, icon and maybe client data pointer from the source.