Created
October 13, 2022 20:20
-
-
Save DiegoAscanio/6502ec8c9794653068ea4a11f2f71a12 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Neutron | |
win = Neutron.Window("Example") | |
HeaderObject = Neutron.elements.Header(win, id="title", content="File Upload") | |
OPEN_DIALOG = 30 | |
def open_file_dialog(): | |
path = ''.join( | |
win.webview.create_file_dialog( | |
OPEN_DIALOG, | |
allow_multiple = True, | |
file_types = ('All Files (*.*)', ) | |
) | |
) | |
print(path) | |
return path | |
Neutron.elements.Button(win, id="submit", content="Upload File", onclick=Neutron.event(open_file_dialog)) | |
win.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment