DearPyGui icon indicating copy to clipboard operation
DearPyGui copied to clipboard

File dialog position

Open v-ein opened this issue 4 months ago • 0 comments

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:

  1. Create a file dialog with pos. It fails due to an unknown argument.
  2. Create a file dialog without pos and then use set_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()

v-ein avatar Sep 08 '25 13:09 v-ein