How to close a window in Tkinter? Last Updated : 09 Dec, 2020 Comments Improve Suggest changes Like Article Like Report Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with tkinter is the fastest and easiest way to create GUI applications. Creating a GUI using tkinter is an easy task. To close a tkinter window, we can use the destroy() method. The destroy() is a universal widget method i.e we can use this method with any of the available widgets as well as with the main tkinter window. Example: In the below example, we are going to implement the destroy() method using a button. Python # import required module from tkinter import * # create object root = Tk() # create button to implement destroy() Button(root, text="Quit", command=root.destroy).pack() root.mainloop() Output: In the above example, on clicking the button the destroy() method is called and the tkinter window is closed. Comment More infoAdvertise with us Next Article How to close a window in Tkinter? H hemsharan2050 Follow Improve Article Tags : Technical Scripter Python Technical Scripter 2020 Python-tkinter Python-gui +1 More Practice Tags : python Similar Reads How to Close a Tkinter Window With a Button? Prerequisites: Tkinter Python's Tkinter module offers the Button function to create a button in a Tkinter Window to execute any task once the button is clicked. The task can be assigned in the command parameter of Button() function. Given below are various methods by which this can be achieved. Meth 3 min read How to add a margin to a tkinter window? In this article, we will see how to add a margin to the Tkinter window. We will use the frame for adding the margin: Syntax: Frame(root, options) Approach: Importing the module.Create the main window (container)Use frame and frame.pack()Apply the event Trigger on the widgets. Without using frame me 2 min read How to Create Full Screen Window in Tkinter? Prerequisite: Tkinter There are two ways to create a full screen window in tkinter using standard python library for creating GUI applications. Method 1: Using attributes() function Syntax: window_name.attributes('-fullscreen',True) We will set the parameter '-fullscreen' of attributes() to True for 3 min read How To Center A Window On The Screen In Tkinter? Tkinter provides a basic geometry manager to control the placement of widgets within a window, it doesn't offer a built-in method to automatically center a window on the screen. However, achieving this task is relatively straightforward with a few lines of code. In this article, we'll explore differ 2 min read Python Tkinter - Frameless window Prerequisite: Python GUI â tkinter Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. To create a Frameless window, we will us 1 min read Like