-
Hello, Great thanks to your work, I am enjoying great deal of help for writing a GUI interface to my experiment instruments. import dearpygui.dearpygui as dpg
dpg.create_context()
# enabling init file.
dpg.configure_app(init_file=os.path.join(os.getcwd(), "dpg.ini"))
with dpg.window() as win_id:
...
# configuring height/width: No longer works when init_file is set.
dpg.set_item_height(win_id, 200)
dpg.set_item_width(win_id, 800)
dpg.create_viewport()
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context() |
Beta Was this translation helpful? Give feedback.
Answered by
hoffstadt
Jan 25, 2022
Replies: 1 comment 2 replies
-
This is correct behavior. The init file overrides the initial window height/width. You can set them after. i.e. import dearpygui.dearpygui as dpg
dpg.create_context()
dpg.configure_app(init_file="dpg.ini")
dpg.create_viewport()
dpg.setup_dearpygui()
def callback():
# configuring height/width: No longer works when init_file is set.
dpg.set_item_height("win", 200)
dpg.set_item_width("win", 800)
with dpg.window(tag="win"):
dpg.add_button(label="Press me", callback=callback)
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context() |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
ultgift
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is correct behavior. The init file overrides the initial window height/width. You can set them after. i.e.