New Demo - Window Disappear
This commit is contained in:
parent
5fb1e31efa
commit
6d123a44eb
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
if sys.version_info[0] >= 3:
|
||||
import PySimpleGUI as sg
|
||||
else:
|
||||
import PySimpleGUI27 as sg
|
||||
|
||||
layout = [[ sg.Text('My Window') ],
|
||||
[ sg.RButton('Disappear')]]
|
||||
|
||||
window = sg.Window('My window').Layout(layout)
|
||||
|
||||
while True:
|
||||
button, value = window.Read()
|
||||
if button is None:
|
||||
break
|
||||
if button == 'Disappear':
|
||||
window.Disapper()
|
||||
sg.Popup('Click OK to make window reappear')
|
||||
window.Reappear()
|
||||
|
Loading…
Reference in New Issue