PyDocs

Nav

Graphical user interfaces with Tk

onclick

turtle

function
  • onclick(fun, btn=1, add=None)
Bind fun to mouse-click events on this screen. fun is called with the coordinates of the clicked point on the canvas. If fun is None, existing bindings are removed. btn is the number of the mouse button and defaults to 1, the left mouse button. If add is True, a new binding is added, otherwise it replaces a former binding.
1 Example
>>> screen.onclick(turtle.goto) # Subsequently clicking into the TurtleScreen will
>>>                             # make the turtle move to the clicked point.
>>> screen.onclick(None)        # remove event binding again
from the Python docs
See Also
No see-alsos for turtle/onclick
0 Notes
No notes for onclick