Renamed return value from Read call from button to event... EVERYWHERE
This commit is contained in:
parent
43526e0182
commit
c79a8772cc
86 changed files with 7992 additions and 12709 deletions
|
@ -15,10 +15,10 @@ window = sg.Window('Canvas test').Layout(layout).Finalize()
|
|||
cir = window.FindElement('canvas').TKCanvas.create_oval(50, 50, 100, 100)
|
||||
|
||||
while True:
|
||||
button, values = window.Read()
|
||||
if button is None:
|
||||
event, values = window.Read()
|
||||
if event is None:
|
||||
break
|
||||
if button is 'Blue':
|
||||
if event is 'Blue':
|
||||
window.FindElement('canvas').TKCanvas.itemconfig(cir, fill = "Blue")
|
||||
elif button is 'Red':
|
||||
elif event is 'Red':
|
||||
window.FindElement('canvas').TKCanvas.itemconfig(cir, fill = "Red")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue