PySimpleGUI/Demo_Func_Callback_Simulati...

19 lines
499 B
Python
Raw Normal View History

2018-09-27 20:24:09 +00:00
#!/usr/bin/env python
import sys
if sys.version_info[0] >= 3:
2018-09-27 20:24:09 +00:00
import PySimpleGUI as sg
else:
import PySimpleGUI27 as sg
2018-08-04 11:38:36 +00:00
2018-09-23 16:16:50 +00:00
layout = [[sg.Text('Filename', )],
[sg.Input(), sg.FileBrowse()],
[sg.OK(), sg.Cancel()]]
2018-08-04 11:38:36 +00:00
button, (number,) = sg.Window('Get filename example').LayoutAndRead(layout)
2018-08-04 11:38:36 +00:00
2018-09-23 16:16:50 +00:00
import PySimpleGUI as sg
2018-08-04 11:38:36 +00:00
button, (filename,) = sg.Window('Get filename example').LayoutAndRead(
2018-09-23 16:16:50 +00:00
[[sg.Text('Filename')], [sg.Input(), sg.FileBrowse()], [sg.OK(), sg.Cancel()]])