PythonByteSize
  • Home
  • Detailed Videos
  • 1-Minute Videos
  • Exercises
  • Donate
  • Computing Topics
  • Mathematics
  • Educators
  • Contact
  • About
  • Python Learning Roadmap

10.9. How to place a Python tkinter window in the center of the screen

This tutorial demonstrates how to center a window on the screen, irrespective of the window's size or the monitor's resolution, using winfo_screenwidth() and winfo_screenheight(). It is important to note that the title bar of the window is not considered in these calculations, so the window is nearly, but not perfectly, centered.
<< Back to Section 10 Index
<< Previous Video
Next Video >>
Please consider donating to help with the costs incurred in developing this website.             Donate >>