From 070cc6ebcc2ca62f68c7ec1f44ce99c860cb0513 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Thu, 2 Apr 2020 10:57:47 -0400 Subject: [PATCH] Removed check for 'Exit' --- docs/cookbook.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cookbook.md b/docs/cookbook.md index dcd955b3..b517d7da 100644 --- a/docs/cookbook.md +++ b/docs/cookbook.md @@ -866,7 +866,7 @@ window = sg.Window('Pick a color', layout) while True: # the event loop event, values = window.read() - if event in (None, 'Exit'): + if event is None: break if event == 'Ok': if values['-COLOR-']: # if something is highlighted in the list @@ -899,7 +899,7 @@ window = sg.Window('Pick a color', layout) while True: # the event loop event, values = window.read() - if event in (None, 'Exit'): + if event is None: break if values['-COLOR-']: # if something is highlighted in the list sg.popup(f"Your favorite color is {values['-COLOR-'][0]}")