Merge pull request #1273 from PySimpleGUI/Dev-latest
Made Window 1 a blocking Read
This commit is contained in:
commit
bfc616e080
|
@ -9,7 +9,8 @@ win1 = sg.Window('Window 1').Layout(layout)
|
|||
|
||||
win3_active = win2_active = False
|
||||
while True:
|
||||
ev1, vals1 = win1.Read(timeout=100)
|
||||
if not win2_active:
|
||||
ev1, vals1 = win1.Read()
|
||||
if ev1 is None or ev1 == 'Exit':
|
||||
break
|
||||
win1.FindElement('_OUTPUT_').Update(vals1[0])
|
||||
|
@ -38,8 +39,10 @@ while True:
|
|||
|
||||
if win3_active:
|
||||
ev3, vals3 = win3.Read()
|
||||
if ev3 in (None, 'Exit', '< Prev'):
|
||||
if ev3 == '< Prev':
|
||||
win3.Close()
|
||||
win3_active = False
|
||||
win2_active = True
|
||||
win2.UnHide()
|
||||
elif ev3 in (None, 'Exit'):
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue