-
-
Notifications
You must be signed in to change notification settings - Fork 732
Open
Labels
Description
Version: 2.0.0
Operating System: Windows 11
When bound to an item_handler_registry with an item_resize_handler, the child_window container will not trigger the callback when resized with the mouse.
To Reproduce
Steps to reproduce the behavior:
- create item_handler_registry with an item_resize_handler
- create window with child_window and flags resizable_x and resizable_y set as True
- bind the item_handler_registry to the child_window
- run the program and resize the child_window by dragging the borders
Expected behavior
The callback in of the item_resize_handler should be called when the container is resized
Standalone, minimal, complete and verifiable example
import dearpygui.dearpygui as dpg
dpg.create_context()
dpg.create_viewport(title="Test - Child window resize callback", width=800, height=800)
def child_window_resized(_sender, _app_data):
print("Child window resized")
with dpg.item_handler_registry(tag="resize handler"):
dpg.add_item_resize_handler(callback=child_window_resized)
with dpg.window():
dpg.set_primary_window(dpg.last_item(), True)
with dpg.child_window(tag="cw", resizable_x=True, resizable_y=True):
dpg.add_text("Child window 1")
dpg.bind_item_handler_registry("cw", "resize handler")
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()