hoffstadt/DearPyGui

Change z-order between two windows

sailfish009 opened this issue · 2 comments

Is your feature request related to a problem? Please describe.
When two windows are nested in the same position, I want to reorder them by moving the lower window to the top and moving the top window down.
https://github.com/sailfish009/pymbm/blob/main/pymbm.py#L28

create_deep_window(WINDOW_TAG3, SIDE_PANEL_W, PROGRAM_W, PROGRAM_H)
create_main_window(WINDOW_TAG1, SIDE_PANEL_W, PROGRAM_W, PROGRAM_H)

Describe the solution you'd like

with dpg.window(tag=TAG1,.., zorder=10)
with dpg.window(tag=TAG2,.., zorder=5)
with dpg.window(tag=TAG3,.., zorder=0)
dpg.configure_item(TAG1, zorder=0)
dpg.configure_item(TAG2, zorder=5)
dpg.configure_item(TAG3, zorder=10)

Describe alternatives you've considered
None

Additional context
https://github.com/sailfish009/pymbm

Doesn't dpg.focus_item() do what you need?

Thank you. It's working fine.