diff options
author | sara <sara.halter@gmx.ch> | 2021-12-06 19:38:41 +0100 |
---|---|---|
committer | sara <sara.halter@gmx.ch> | 2021-12-06 19:38:41 +0100 |
commit | 217589c5a39ed41abdf53cb1860fe2365394b357 (patch) | |
tree | 04e7482bbd9d422bcd40cd29dd70d80aa4a00aa8 /src/gui/test2.py | |
parent | Re-organize implementation, start writing phase correction (diff) | |
download | Fading-217589c5a39ed41abdf53cb1860fe2365394b357.tar.gz Fading-217589c5a39ed41abdf53cb1860fe2365394b357.zip |
An GUI weitergearbeitet
Diffstat (limited to '')
-rw-r--r-- | src/gui/test2.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gui/test2.py b/src/gui/test2.py new file mode 100644 index 0000000..f339af8 --- /dev/null +++ b/src/gui/test2.py @@ -0,0 +1,22 @@ +import dearpygui.dearpygui as dpg + +dpg.create_context() + +with dpg.window(label="about", width=400, height=400): + dpg.add_button(label="Press me") + dpg.draw_line((0, 10), (100, 100), color=(255, 0, 0, 255), thickness=1) + +# print children +print(dpg.get_item_children(dpg.last_root())) + +# print children in slot 1 +print(dpg.get_item_children(dpg.last_root(), 1)) + +# check draw_line's slot +print(dpg.get_item_slot(dpg.last_item())) + +dpg.create_viewport(title='Custom Title', width=800, height=600) +dpg.setup_dearpygui() +dpg.show_viewport() +dpg.start_dearpygui() +dpg.destroy_context() |