0

I created a turtle window with python, but I can't make it automatically goes to fullscreen when the program first runs. How to do it? wn.fullScreen()? Thanks for the help!

import turtle

wn=turtle.Screen()
wn.bgcolor("blue")

#wn.fullScreen() ?
G - NERD
  • 3
  • 1

1 Answers1

0
import turtle
wn=turtle.Screen()
wn.bgcolor("blue")
wn.setup(width = 1.0, height = 1.0, startx=None, starty=None)

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

Arun K
  • 413
  • 4
  • 15
  • While this code may solve the question, [including an explanation](//meta.stackexchange.com/q/114762) of how and why this solves the problem would really help to improve the quality of your post, and probably result in more up-votes. Remember that you are answering the question for readers in the future, not just the person asking now. Please [edit] your answer to add explanations and give an indication of what limitations and assumptions apply. – Adrian Mole Sep 02 '20 at 16:16
  • can I use the "setup" keyword to make the turtle screen size? – G - NERD Sep 05 '20 at 03:27
  • This link will give you more details https://stackoverflow.com/questions/56528067/how-can-i-change-the-size-of-my-python-turtle-window – Arun K Sep 05 '20 at 11:36