hoffstadt/DearPyGui

Optional "item handler registry" argument for popups

giogina opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
I'm trying to both a) change the label of my tree nodes on click, and b) have a right-click pop-up on the tree node. I can only have one or the other, because popups make their own item handler registries and replace the existing ones.

Describe the solution you'd like
If popup were to accept an extra optional argument handler_registry_tag, and, if provided, use said registry instead of creating a new one, you could have popups in addition to other click handlers.

dpg.popup is only a convenient wrapper around dpg.window(popup=True). You can even peek at its implementation in dearpygui.py, it's pretty lightweight. That said, you can make your own popup using dpg.window(popup=True) - this way you can tune up the handler registry all the way you want. There's no need to complicate dpg.popup by adding extra parameters to it.