Moving a node up or down in a tree

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mymokol

This question probably has a very simple answer, I just couldn’t find it anywhere:

Is there a way to move a node up or down in a tree? Say, for example, you used add_child(some_node), but wanted for example an overlay node to stay above that node, without using set_as_toplevel() (it messes with the position).

Alternatively, is there a way to add a child in a certain position, so that the overlay would appear over the added child?

:bust_in_silhouette: Reply From: exuin

The add child below node and move child functions might be useful.

Thanks a lot! I tried add_child_below_node() before and it didn’t really work out, but move_child works just fine. I wasn’t aware of that function.

mymokol | 2021-01-18 09:17