Getting screen’s height and width using Tkinter | Python
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_screenwidth() // 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.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course