I'm new to tkinter and I'm coding a simple "Paint" program, that draws a pixel on screen when I press my mouse.
So i tried to bind my function "is_pressed" like this:
#is pressed
def is_pressed(event):
print('Mouse is pressed!')
#creating canvas
my_canvas = tkinter.Canvas(height=400, width=600)
my_canvas.pack()
#binding
my_canvas.bind('<Button-1>', is_pressed)
Now, I want this function to run when mouse is pressed, not when it's just clicked. How do i do it?