Skip to content

Instantly share code, notes, and snippets.

@DiegoAscanio
Created October 13, 2022 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DiegoAscanio/6502ec8c9794653068ea4a11f2f71a12 to your computer and use it in GitHub Desktop.
Save DiegoAscanio/6502ec8c9794653068ea4a11f2f71a12 to your computer and use it in GitHub Desktop.
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