← Go Back

How to Maximize Window in Tk (tkinter)

Instances of tk.Tk and tk.Toplevel (child windows) classes provide the state() method to maximize the window:

import tkinter as tk

root = tk.Tk()
# Maximize the window.
root.state("zoomed")
root.mainloop()


tkinter window desktop-applications


🐍 You might also find interesting: