Replies: 1 comment
-
you can code your own Window class - context manager. def __init__(self):
self.id= dpg.add_window()
def __enter__(self):
"""adding item to this window"""
dpg.push_container_stack(self.id)
return self
def __exit__(self, type, value, traceback):
dpg.pop_container_stack() so usage will be, with Window() as wnd_instance: ...
with wnd_instance:
dpg.add_button()...
(x, y) = wnd_instance.get_pos()
... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
hello
i am a beginner in python and with dearpygui... i am looking to create items to use/configure them later (so not at the time of their creation). for example with a plot. but i can't do it. i am looking to do something like this :
_wav_plot=dpg.add_plot(label="Wave", height=300, width=1500)
.
.
.
with wav_plot:
dpg.add_plot_axis(dpg.mvXAxis,no_tick_marks=True)
but it doesn't work like that. is it possible?
thanks
Beta Was this translation helpful? Give feedback.
All reactions