from tkinter import *
root = Tk()
coords=1017,474
frame = Canvas(root, width=1680, height=960)
def cords(event):
print(event.x,event.y)
def click(event):
frame.create_line(event.x,event.y,coords)
frame.bind('<B1-Motion>',click)
frame.bind('<Button-1>',cords)
photo=PhotoImage('images.png')
label=Label(frame,image=photo)
label.grid(row=5,)
frame.pack()
root.mainloop()
이 코드를 실행하면 내 창이 최소 크기입니다. 누군가 왜 저에게 말할 수 있습니까? 그리고 ok 크기로 작동 할 때 내 바인딩과 이미지는 존재하지 않습니다.나의 캔버스 나는 작을 때 크기가 1680x960
캔버스 내부 또는 외부에 레이블이 있어야합니까? 창 크기를 조정할 때 캔버스가 커지고 축소되는 것을 기대합니까? 캔버스를 스크롤 할 수있을 것으로 기대합니까? –