How to get the current window size using Tkinter?

How to get current window size using Tkinter or maybe using the standard python library?

+4
source share
1 answer

Use the following generic widget methods (where w is the widget):

 w.winfo_height() w.winfo_width() 

You can also use the following:

 w.winfo_reqheight() w.winfo_reqwidth() 

Read about universal widgets .

+9
source

All Articles