updated concurrency examples
This commit is contained in:
22
concurrency/flags/count_colors.py
Normal file
22
concurrency/flags/count_colors.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import tkinter
|
||||
|
||||
class Test:
|
||||
def __init__(self, master):
|
||||
|
||||
canvas = tkinter.Canvas(master)
|
||||
|
||||
canvas.image = tkinter.PhotoImage(file = 'img/br.gif')
|
||||
print(vars(canvas.image))
|
||||
|
||||
canvas.create_image(0,0, image=canvas.image, anchor=tkinter.NW)
|
||||
canvas.bind('<Button-2>', self.right_click)
|
||||
|
||||
canvas.grid(row=0, column=0)
|
||||
|
||||
def right_click(self, event):
|
||||
print(vars(event))
|
||||
raise SystemExit()
|
||||
|
||||
root = tkinter.Tk()
|
||||
test = Test(root)
|
||||
root.mainloop()
|
||||
Reference in New Issue
Block a user