Merge pull request #3069 from PySimpleGUI/Dev-latest

Simplified demo by removing sizes
This commit is contained in:
PySimpleGUI 2020-06-26 16:59:36 -04:00 committed by GitHub
commit 1dacd8de84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -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: