Cleaning up demos so local changes get rolled in. Old demos removed. There is a significant effort underway

This commit is contained in:
PySimpleGUI 2021-03-01 06:59:36 -05:00
parent 724d6ae7a9
commit 0ec79ce4b4
8 changed files with 35 additions and 64 deletions

View file

@ -10,11 +10,11 @@ sg.theme('GreenTan') # give our window a spiffy set of colors
layout = [[sg.Text('Your output will go here', size=(40, 1))],
[sg.Output(size=(110, 20), font=('Helvetica 10'))],
[sg.Multiline(size=(70, 5), enter_submits=True, key='-QUERY-', do_not_clear=False),
[sg.Multiline(size=(70, 5), enter_submits=False, key='-QUERY-', do_not_clear=False),
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', layout, font=('Helvetica', ' 13'), default_button_element_size=(8,2))
window = sg.Window('Chat window', layout, font=('Helvetica', ' 13'), default_button_element_size=(8,2), use_default_focus=False)
while True: # The Event Loop
event, value = window.read()
@ -23,6 +23,6 @@ while True: # The Event Loop
if event == 'SEND':
query = value['-QUERY-'].rstrip()
# EXECUTE YOUR COMMAND HERE
print('The command you entered was {}'.format(query))
print('The command you entered was {}'.format(query), flush=True)
window.close()
window.close()