VOOZH about

URL: https://www.geeksforgeeks.org/python/getting-screens-height-and-width-using-tkinter-python/

⇱ Getting screen's height and width using Tkinter | Python - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Getting screen's height and width using Tkinter | Python

Last Updated : 14 Sep, 2021

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. 
 

Output: 
 

👁 Image


  
Code #2: Getting height and width in mm. 
 

Output: 
 

👁 Image


 

Comment
Article Tags: