Asked • 07/12/19

Python Tkinter: Attempt to get widget size?

I am trying to find the size of my window by using the `winfo_geometry()` function but it ends up returning `1x1+0+0` I have also tried `winfo_height, winfo_width` but i keep getting `1` ### CODE ### from tkinter import *  root=Tk()  root.geometry('400x600')  print (root.winfo_width())  print (root.winfo_height())  print (root.winfo_geometry())  root.mainloop()

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.