diff --git a/DemoPrograms/Demo_LED_Indicators_Text_Based.py b/DemoPrograms/Demo_LED_Indicators_Text_Based.py index 371d4c20..cc60caef 100644 --- a/DemoPrograms/Demo_LED_Indicators_Text_Based.py +++ b/DemoPrograms/Demo_LED_Indicators_Text_Based.py @@ -15,15 +15,16 @@ sg.theme('Light Brown 4') CIRCLE = '⚫' CIRCLE_OUTLINE = '⚪' -layout = [ [sg.Text('Status 1', size=(12,1)), sg.Text(CIRCLE_OUTLINE, size=(10,1), text_color='green', key='-LED0-')], - [sg.Text('Status 2', size=(12,1)), sg.Text(CIRCLE_OUTLINE, size=(10,1), text_color='red', key='-LED1-')], - [sg.Text('Status 3', size=(12,1)), sg.Text(CIRCLE_OUTLINE, size=(10,1), text_color='blue', key='-LED2-')]] +layout = [ [sg.Text('Status 1 '), sg.Text(CIRCLE_OUTLINE, text_color='green', key='-LED0-')], + [sg.Text('Status 2 '), sg.Text(CIRCLE_OUTLINE, text_color='red', key='-LED1-')], + [sg.Text('Status 3 '), sg.Text(CIRCLE_OUTLINE, text_color='blue', key='-LED2-')], + [sg.Button('Exit')]] window = sg.Window('Window Title', layout, font='Any 16') while True: event, values = window.read(timeout=200) - if event == sg.WIN_CLOSED: + if event == sg.WIN_CLOSED or event == 'Exit': break for i in range(3): if randint(1,100) < 25: