DearPyGui
DearPyGui copied to clipboard
File dialog position
Version of Dear PyGui
Version: 2.1.0 Operating System: Windows
My Issue/Question
While file_dialog does not support pos, it looks like support for it exists in the code as set_item_pos seems to work (to some extent).
See the following Discord post for discussion on this topic: How do you set the file dialog position in window?.
To Reproduce
Steps to reproduce the behavior:
- Create a file dialog with
pos. It fails due to an unknown argument. - Create a file dialog without
posand then useset_item_pos. It works.
Expected behavior
Either both pos and set_item_pos set the position of the file dialog or both of them don't.
Screenshots/Video
None.
Standalone, minimal, complete and verifiable example
# Here's some code anyone can copy and paste to reproduce your issue
import dearpygui.dearpygui as dpg
dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()
# This will absolutely crash, even if the procedure runs properly and sets the position
dpg.add_file_dialog(...)
dpg.set_item_pos(dpg.last_item(), (10, 20))
# to make it work...
try:
dpg.set_item_pos(dpg.last_item(), (10, 20))
except:
pass # or whatever you want here
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()