2018-09-27 20:24:09 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
import sys
|
2018-09-28 18:57:37 +00:00
|
|
|
if sys.version_info[0] >= 3:
|
2018-09-27 20:24:09 +00:00
|
|
|
import PySimpleGUI as sg
|
2018-09-28 18:57:37 +00:00
|
|
|
else:
|
|
|
|
import PySimpleGUI27 as sg
|
2018-09-14 16:17:19 +00:00
|
|
|
|
2018-09-20 14:41:47 +00:00
|
|
|
# Here, have some windows on me....
|
2018-09-29 17:48:48 +00:00
|
|
|
[sg.PopupNoWait(location=(500+100*x,500)) for x in range(10)]
|
2018-09-20 14:41:47 +00:00
|
|
|
|
2018-09-29 17:48:48 +00:00
|
|
|
answer = sg.PopupYesNo('Do not worry about all those open windows... they will disappear at the end', 'Are you OK with that?')
|
2018-09-14 16:17:19 +00:00
|
|
|
|
2018-09-29 17:48:48 +00:00
|
|
|
if answer == 'No':
|
|
|
|
sg.PopupCancel('OK, we will destroy those windows as soon as you close this window')
|
|
|
|
sys.exit()
|
|
|
|
|
|
|
|
sg.PopupNonBlocking('Your answer was',answer, location=(1000,600))
|
|
|
|
|
|
|
|
text = sg.PopupGetText('This is a call to PopopGetText', location=(1000,200))
|
|
|
|
sg.PopupGetFile('Get file')
|
|
|
|
sg.PopupGetFolder('Get folder')
|
2018-09-14 16:17:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
sg.Popup('Simple popup')
|
|
|
|
|
|
|
|
sg.PopupNoTitlebar('No titlebar')
|
|
|
|
sg.PopupNoBorder('No border')
|
|
|
|
sg.PopupNoFrame('No frame')
|
2018-09-20 14:41:47 +00:00
|
|
|
# sg.PopupNoButtons('No Buttons') # don't mix with non-blocking... disaster ahead...
|
2018-09-14 16:17:19 +00:00
|
|
|
sg.PopupCancel('Cancel')
|
|
|
|
sg.PopupOKCancel('OK Cancel')
|
|
|
|
sg.PopupAutoClose('Autoclose')
|