i want set image into frame in canvas. My idea is to be able to click and take action on the frame.
I know set image and separate frame. But i don't know how to link it.
import tkinter
canvas = tkinter.Canvas()
canvas.pack()
x1, y1, x2, y2 = 50, 50, 150, 150
Img = tkinter.PhotoImage(file = 'vtak0.png')
canvas.create_image(100, 100, image = Img)
canvas.create_rectangle(x1, y1, x2, y2)
Comments
Post a Comment