turtle.ondrag(fun, btn=1, add=None)
Parameters: |
|
---|
Bind fun to mouse-move events on this turtle. If fun is None
, existing bindings are removed.
Remark: Every sequence of mouse-move-events on a turtle is preceded by a mouse-click event on that turtle.
>>> turtle.ondrag(turtle.goto)
Subsequently, clicking and dragging the Turtle will move it across the screen thereby producing handdrawings (if pen is down).
Please login to continue.