From ebb7e7ec2381a2d2c79b9da41a00a79c23e309d9 Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Fri, 5 Apr 2019 20:26:05 -0400 Subject: [PATCH] Brought up to date --- DemoPrograms/Demo_Chat.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DemoPrograms/Demo_Chat.py b/DemoPrograms/Demo_Chat.py index 378aa807..0b2e71fe 100644 --- a/DemoPrograms/Demo_Chat.py +++ b/DemoPrograms/Demo_Chat.py @@ -17,10 +17,10 @@ Multiline and Output text areas were reduced in the online version. Nothing els sg.ChangeLookAndFeel('GreenTan') # give our window a spiffy set of colors -layout = [[sg.Text('Your output will go here', size=(40, 1))], +layout = [ [sg.Text('Your output will go here', size=(40, 1))], [sg.Output(size=(127, 30), font=('Helvetica 10'))], [sg.Multiline(size=(85, 5), enter_submits=True, key='query'), - sg.ReadButton('SEND', button_color=(sg.YELLOWS[0], sg.BLUES[0]), bind_return_key=True), + sg.Button('SEND', button_color=(sg.YELLOWS[0], sg.BLUES[0]), bind_return_key=True), sg.Button('EXIT', button_color=(sg.YELLOWS[0], sg.GREENS[0]))]] window = sg.Window('Chat window', @@ -30,7 +30,7 @@ window = sg.Window('Chat window', # ---===--- Loop taking in user input and using it --- # while True: - (event, value) = window.Read(timeout=0) + event, value = window.Read() if event is 'SEND': query = value['query'].rstrip() # EXECUTE YOUR COMMAND HERE