0

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')
cdlane
42.2k5 gold badges37 silver badges87 bronze badges
asked Aug 12, 2021 at 23:40

2 Answers 2

1

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.

answered Aug 13, 2021 at 4:09
Sign up to request clarification or add additional context in comments.

Comments

0

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
answered Sep 2, 2021 at 9:58

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.