hoffstadt / DearPyGui

Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies
https://dearpygui.readthedocs.io/en
MIT License
12.96k stars 677 forks source link

Selecting multiple dispersed files in file_dialog does not work with CTRL on windows #1406

Open west-rynes opened 2 years ago

west-rynes commented 2 years ago

Version of Dear PyGui

Version: 1.0.2 Operating System: Windows 10 (virtual machine)

My Issue/Question

On windows, if I try to select multiple files not next to each other with CTRL it does not work. While holding CTRL the file name does not change when picking other files. Seems like CTRL is bound since the file name does not update but it doesn't add files. I can select multiple contiguous files with SHIFT as expected.

On Mac both CTRL and SHIFT work as expected with the file_dialog.

Standalone, minimal, complete and verifiable example

# Unable to use ctrl to select dispersed files  on windows

import dearpygui.dearpygui as dpg
import dearpygui

dpg.create_context()

def callback(sender, app_data):
    print("Sender: ", sender)
    print("App Data: ", app_data)

with dpg.file_dialog(show=False, directory_selector=False, tag="file_dialog_tag",
                     callback=callback, file_count=2):
    dpg.add_file_extension(".*")

with dpg.window(label="Tutorial", width=800, height=300):
    dpg.add_button(label="File Selector", callback=lambda: dpg.show_item("file_dialog_tag"))

dpg.create_viewport()
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
hoffstadt commented 2 years ago

It seems to be working on my machine. You mentioned you were running through a VM?