Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using PySimpleGUI's popup functions to get file names #1

Open
PySimpleGUI opened this issue Feb 23, 2020 · 1 comment
Open

Comments

@PySimpleGUI
Copy link

Noticed you're calling tkinter directly to get filenames.

file = askopenfile(mode = 'r', filetypes=[("EPUB files", "*.epub")])

You can do the same thing by calling

sg.popup_get_file('Open which file?', file_types=[("EPUB files", "*.epub")])

Or if you don't want to see the popup's window, you can set a flag so that you get only the open dialog.

sg.popup_get_file('Open which file?', no_window=True, file_types=[("EPUB files", "*.epub")])
@antonmather
Copy link
Owner

Thanks @PySimpleGUI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants