create a menu that expands and collapse

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

create a menu that expands and collapses child nodes

This sounds a lot like a Tree control. If that’s not what you’re after, then maybe you want to provide a more detailed description?

jgodfrey | 2020-12-13 15:33

What do you mean by Tree control, I want to want to collapse the menu and then expand it vertically when I click on it in the control

lalel345 | 2020-12-15 12:04

:bust_in_silhouette: Reply From: jgodfrey

My response above contains a link to the Tree documentation. Though, for a visual reference, that’s the control that’s used in the Godot editor for the Scene Tree and the FileSystem panel.

It provides the expand / collapse feature that you mention, though depending on your requirements, it may not be what you need…

I copy the example code and it doesn’t work, as it would with a label

lalel345 | 2020-12-16 13:21