Release 0.18.0, Updated Demo Programs
This commit is contained in:
parent
97c717d67c
commit
f7e563c81b
8 changed files with 332 additions and 5 deletions
26
PySimpleGUIWeb/Demo Programs/Web_Simple.py
Normal file
26
PySimpleGUIWeb/Demo Programs/Web_Simple.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
import PySimpleGUIWeb as sg
|
||||
|
||||
def main():
|
||||
layout = [
|
||||
[sg.Text('This is a text element')],
|
||||
[sg.Input()],
|
||||
[sg.Combo(['Combo 1'])],
|
||||
[sg.Text('If you close the browser tab, the app will exit gracefully')],
|
||||
[sg.InputText('Source', do_not_clear=True)],
|
||||
[sg.InputText('Dest', do_not_clear=True)],
|
||||
[sg.Ok(), sg.Cancel()]
|
||||
]
|
||||
|
||||
window = sg.Window('Demo window..').Layout(layout)
|
||||
i = 0
|
||||
while True:
|
||||
event, values = window.Read(timeout=1)
|
||||
if event != sg.TIMEOUT_KEY:
|
||||
print(event, values)
|
||||
if event is None:
|
||||
break
|
||||
i += 1
|
||||
window.Close()
|
||||
|
||||
main()
|
||||
print('Program terminating normally')
|
Loading…
Add table
Add a link
Reference in a new issue