turtle.onscreenclick(fun, btn=1, add=None)
Parameters: |
|
---|
Bind fun to mouse-click events on this screen. If fun is None
, existing bindings are removed.
Example for a TurtleScreen instance named screen
and a Turtle instance named turtle:
>>> 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
Note
This TurtleScreen method is available as a global function only under the name onscreenclick
. The global function onclick
is another one derived from the Turtle method onclick
.
Please login to continue.