diff options
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() |