S
Shi Mu
I have the following workable code and every time i click on the
canvas, the coordinates are reported.
i wonder how i can draw the lines when i click the canvas using these
coordinates?
from Tkinter import *
root = Tk()
c = Canvas(root, bg='#0e2e0e', height=500, width=1000)
def click(event):
print event.x, event.y
frame = c
c.bind('<Button-1>',click)
c.pack()
root.mainloop()
canvas, the coordinates are reported.
i wonder how i can draw the lines when i click the canvas using these
coordinates?
from Tkinter import *
root = Tk()
c = Canvas(root, bg='#0e2e0e', height=500, width=1000)
def click(event):
print event.x, event.y
frame = c
c.bind('<Button-1>',click)
c.pack()
root.mainloop()