0

I am trying to find code to make my turtle window automatically expand to fit the computer/HDMI screen. I found the following code that works for doing this with tkinter:

root = tkinter.Tk()
root.overrideredirect(True)
root.geometry("{0}x{1}+0+0".format(root.winfo_screenwidth(), root.winfo_screenheight()))

but it doesnt work for turtle, im assuming because of the "root = tkinter.Tk()"

What can I use in turtle to accomplish this?

unor
  • 92,415
  • 26
  • 211
  • 360
  • You might be able to do it by using the `setup()` function and specifying a width and height of 100% of the screen by using `1.00`, a floating point value. See question [**Python imaging using Turtle Graphics Resizing help**](http://stackoverflow.com/questions/831894/python-imaging-using-turtle-graphics-resizing-help) and the docs for [`setup()`](https://docs.python.org/2/library/turtle.html#turtle.setup). – martineau Jul 09 '14 at 07:32

1 Answers1

0

Try this:

w, h = screen.winfo_screenwidth(), screen.winfo_screenheight()
 screen. screensize( 2000 , 1500 )

screen is your main turtle window.

This must be useful. It first gets the width and height of the screen and then sets the width and height of the width to the widtg and height of the screen.