Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional "item handler registry" argument for popups #2286

Open
giogina opened this issue Feb 17, 2024 · 1 comment
Open

Optional "item handler registry" argument for popups #2286

giogina opened this issue Feb 17, 2024 · 1 comment
Labels
state: pending not addressed yet

Comments

@giogina
Copy link

giogina commented Feb 17, 2024

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.

@giogina giogina added the state: pending not addressed yet label Feb 17, 2024
@v-ein
Copy link
Contributor

v-ein commented Feb 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: pending not addressed yet
Projects
None yet
Development

No branches or pull requests

2 participants