Merge pull request #3032 from PySimpleGUI/Dev-latest

Removed very old template because it used the CloseButton that's not …
This commit is contained in:
PySimpleGUI 2020-06-18 11:17:29 -04:00 committed by GitHub
commit 6a1cc14b1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 34 deletions

View File

@ -1,34 +0,0 @@
#!/usr/bin/env python
import PySimpleGUI as sg
#
# Choose one of these are your starting point. Copy, paste, have fun
#
# ---------------------------------#
# DESIGN PATTERN 1 - Simple Window #
# ---------------------------------#
layout = [[ sg.Text('My layout') ],
[ sg.CloseButton('Next Window')]]
window = sg.Window('My window', layout)
event, values = window.read()
# --------------------------------------------------#
# DESIGN PATTERN 2 - Persistent Window (stays open) #
# --------------------------------------------------#
layout = [[ sg.Text('My Window') ],
[ sg.Button('Read The Window')]]
window = sg.Window('My Window Title', layout)
while True: # Event Loop
event, values = window.read()
if event == sg.WIN_CLOSED: # if window closed with X
break
print(event, values)
window.close()