Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Deep Learning avec Python
et Keras et Tensorflow
Voir le programme détaillé
Classe « TurtleScreen » Python 3.13.2

Méthode turtle.TurtleScreen.onclick

Signature de la méthode onclick

def onclick(self, fun, btn=1, add=None) 

Description

help(TurtleScreen.onclick)

Bind fun to mouse-click event on canvas.

Arguments:
fun -- a function with two arguments, the coordinates of the
       clicked point on the canvas.
btn -- the number of the mouse-button, defaults to 1

Example (for a TurtleScreen instance named screen)

>>> screen.onclick(goto)
>>> # Subsequently clicking into the TurtleScreen will
>>> # make the turtle move to the clicked point.
>>> screen.onclick(None)


Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé