You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this example, clicking outside the popup will never call on_close_handler.
In the C++ code, we can see that there is code to handle on_close for modal windows, but not for popups. Copying the code for modal windows seems to work in my case. With that change, clicking outside the popup does trigger on_close. However I didn't find a way to properly 'close' the popup in response to some interaction inside the popup (delete_item doesn't trigger on_close, neither show=False). In this case my workaround was to called the on_close handler in the concerned handlers to complement clicking outside the popup.
The text was updated successfully, but these errors were encountered:
Version of Dear PyGui
Version: 1.11.1
Operating System: Arch Linux
My Issue/Question
I want to open a popup window on top of a plot in response to a click, and I need to be notified when the popup is closed.
A popup is closed by clicking outside the popup.
With current dpg, the on_close callback is never called for popup windows.
To Reproduce
In this example, clicking outside the popup will never call on_close_handler.
In the C++ code, we can see that there is code to handle on_close for modal windows, but not for popups. Copying the code for modal windows seems to work in my case. With that change, clicking outside the popup does trigger on_close. However I didn't find a way to properly 'close' the popup in response to some interaction inside the popup (delete_item doesn't trigger on_close, neither show=False). In this case my workaround was to called the on_close handler in the concerned handlers to complement clicking outside the popup.
The text was updated successfully, but these errors were encountered: