Tkinter provides some methods with the help of which we can get the current screen height and width.
Following methods can be used to decide height and width :
winfo_screenheight() // Returns screen height in pixels winfo_screenmmheight() // Returns screen height in mm winfo_screenwidht() // Returns screen width in pixels winfo_screenmmwidth() // Returns screen width in mm
Code #1: Getting height and width in pixels.
Code #2: Getting height and width in mm.
- Python GUI - tkinter
- Python | after method in Tkinter
- Different messages in Tkinter | Python
- RadioButton in Tkinter | Python
- Python | asksaveasfile() function in Tkinter
- Python | Simple calculator using Tkinter
- Python | winfo_ismapped() and winfo_exist() in Tkinter
- Python | PanedWindow Widget in Tkinter
- Python | Add style to tkinter button
- Python | Creating a button in tkinter
- Python | grid() method in Tkinter
- Python | Add image on a Tkinter button
- Python | pack() method in Tkinter
- Python | place() method in Tkinter
- Python | Simple GUI calculator using Tkinter
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.