I put initial screensize for turtle, but it open with the same standard size and scrollbars. Do not open with total size. Have any way to start window with total size (without scollbars)?
Thank you!
import turtle as t
largura = 1200
altura = 800
t.screensize(canvwidth=largura, canvheight=altura, bg='lightgrey')
2 Answers 2
You can set the window's size using the setup() method or function. Don't use screensize() for this purpose. For details see this answer.
Any window 420 x 320, or larger, shouldn't get scrollbars by default. For details see this answer.
Comments
setup() function can be used.code snippet
turtle.setup(width=_CFG["width"], height=_CFG["height"], startx=_CFG["leftright"], starty=_CFG["topbottom"]) Set the size and position of the main window. Default values of arguments are stored in the configuration dictionary and can be changed via a turtle.cfg file.
Parameters
width – if an integer, a size in pixels, if a float, a fraction of the screen; default is 50% of screen
height – if an integer, the height in pixels, if a float, a fraction of the screen; default is 75% of screen
startx – if positive, starting position in pixels from the left edge of the screen, if negative from the right edge, if None, center window horizontally
starty – if positive, starting position in pixels from the top edge of the screen, if negative from the bottom edge, if None, center window vertically
screen.setup (width=200, height=200, startx=0, starty=0)
# sets window to 200x200 pixels, in upper left of screen
screen.setup(width=.75, height=0.5, startx=None, starty=None)
# sets window to 75% of screen by 50% of screen and centers
Comments
Explore related questions
See similar questions with these tags.