turtle.onclick(fun, btn=1, add=None)
Parameters: |
|
---|
Bind fun to mouse-click events on this turtle. If fun is None
, existing bindings are removed. Example for the anonymous turtle, i.e. the procedural way:
>>> def turn(x, y): ... left(180) ... >>> onclick(turn) # Now clicking into the turtle will turn it. >>> onclick(None) # event-binding will be removed
Please login to continue.