Merge pull request #1291 from PySimpleGUI/Dev-latest
Brought up to date
This commit is contained in:
commit
ed3c788ab3
|
@ -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
|
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.Output(size=(127, 30), font=('Helvetica 10'))],
|
||||||
[sg.Multiline(size=(85, 5), enter_submits=True, key='query'),
|
[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]))]]
|
sg.Button('EXIT', button_color=(sg.YELLOWS[0], sg.GREENS[0]))]]
|
||||||
|
|
||||||
window = sg.Window('Chat window',
|
window = sg.Window('Chat window',
|
||||||
|
@ -30,7 +30,7 @@ window = sg.Window('Chat window',
|
||||||
|
|
||||||
# ---===--- Loop taking in user input and using it --- #
|
# ---===--- Loop taking in user input and using it --- #
|
||||||
while True:
|
while True:
|
||||||
(event, value) = window.Read(timeout=0)
|
event, value = window.Read()
|
||||||
if event is 'SEND':
|
if event is 'SEND':
|
||||||
query = value['query'].rstrip()
|
query = value['query'].rstrip()
|
||||||
# EXECUTE YOUR COMMAND HERE
|
# EXECUTE YOUR COMMAND HERE
|
||||||
|
|
Loading…
Reference in New Issue