PySimpleGUI/Demo_Popups.py

28 lines
738 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
# Here, have some windows on me....
[sg.PopupNoWait(location=(10*x,0)) for x in range(10)]
2018-09-18 16:05:44 +00:00
print (sg.PopupYesNo('Yes No'))
print(sg.PopupGetText('Get text', location=(1000,200)))
print(sg.PopupGetFile('Get file'))
print(sg.PopupGetFolder('Get folder'))
sg.Popup('Simple popup')
2018-09-18 16:05:44 +00:00
sg.PopupNonBlocking('Non Blocking', location=(500,500))
sg.PopupNoTitlebar('No titlebar')
sg.PopupNoBorder('No border')
sg.PopupNoFrame('No frame')
# sg.PopupNoButtons('No Buttons') # don't mix with non-blocking... disaster ahead...
sg.PopupCancel('Cancel')
sg.PopupOKCancel('OK Cancel')
sg.PopupAutoClose('Autoclose')