New Demo - Window Disappear

This commit is contained in:
MikeTheWatchGuy 2018-10-09 08:42:39 -04:00
parent 5fb1e31efa
commit 6d123a44eb
1 changed files with 21 additions and 0 deletions

21
Demo_Window_Disappear.py Normal file
View File

@ -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()