How to close widget using its own button?

I have a little popup menu widget with some buttons that act on other objects, but I want the menu to also close once I left click on any one of the buttons on the menu widget. How can I achieve this?

One of those:


Depending whether you want to get rid of the widget for good or just hide it.

1 Like

Perfect, thank you :slight_smile:

It’s helpful for others to mark the queston as answered :wink: