Simplified demo by removing sizes
This commit is contained in:
parent
223002f804
commit
4d4e256a79
|
@ -15,15 +15,16 @@ sg.theme('Light Brown 4')
|
||||||
CIRCLE = '⚫'
|
CIRCLE = '⚫'
|
||||||
CIRCLE_OUTLINE = '⚪'
|
CIRCLE_OUTLINE = '⚪'
|
||||||
|
|
||||||
layout = [ [sg.Text('Status 1', size=(12,1)), sg.Text(CIRCLE_OUTLINE, size=(10,1), text_color='green', key='-LED0-')],
|
layout = [ [sg.Text('Status 1 '), sg.Text(CIRCLE_OUTLINE, 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 2 '), sg.Text(CIRCLE_OUTLINE, text_color='red', key='-LED1-')],
|
||||||
[sg.Text('Status 3', size=(12,1)), sg.Text(CIRCLE_OUTLINE, size=(10,1), text_color='blue', key='-LED2-')]]
|
[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')
|
window = sg.Window('Window Title', layout, font='Any 16')
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
event, values = window.read(timeout=200)
|
event, values = window.read(timeout=200)
|
||||||
if event == sg.WIN_CLOSED:
|
if event == sg.WIN_CLOSED or event == 'Exit':
|
||||||
break
|
break
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
if randint(1,100) < 25:
|
if randint(1,100) < 25:
|
||||||
|
|
Loading…
Reference in New Issue