hoffstadt / hoffstadt/DearPyGui

File dialog position

Open
#2,554 0 comments 0 reactions 0 assignees View on GitHub
state: pending type: bug
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

## 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?](https://discord.com/channels/736279277242417272/1118084011374419989).

## 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

```python
# 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()
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.