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 :

Module « turtle » Python 3.11.3

Fonction setup - module turtle

Signature de la fonction setup

def setup(width=0.5, height=0.75, startx=None, starty=None) 

Description

help(turtle.setup)

 Set the size and position of the main window.

        Arguments:
        width: as integer a size in pixels, as float a fraction of the 
          Default is 50% of 
        height: as integer the height in pixels, as float a fraction of the
           Default is 75% of 
        startx: if positive, starting position in pixels from the left
          edge of the screen, if negative from the right edge
          Default, startx=None is to center window horizontally.
        starty: if positive, starting position in pixels from the top
          edge of the screen, if negative from the bottom edge
          Default, starty=None is to center window vertically.

        Examples:
        >>> setup (width=200, height=200, startx=0, starty=0)

        sets window to 200x200 pixels, in upper left of screen

        >>> setup(width=.75, height=0.5, startx=None, starty=None)

        sets window to 75% of screen by 50% of screen and centers