Python Tkinter - Toplevel Widget Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report Tkinter is a GUI toolkit used in python to make user-friendly GUIs.Tkinter is the most commonly used and the most basic GUI framework available in Python. Tkinter uses an object-oriented approach to make GUIs. Note: For more information, refer to Python GUI – tkinter Toplevel widget A Toplevel widget is used to create a window on top of all other windows. The Toplevel widget is used to provide some extra information to the user and also when our program deals with more than one application. These windows are directly organized and managed by the Window Manager and do not need to have any parent window associated with them every time. Syntax: toplevel = Toplevel(root, bg, fg, bd, height, width, font, ..) Optional parameters root = root window(optional) bg = background colour fg = foreground colour bd = border height = height of the widget. width = width of the widget. font = Font type of the text. cursor = cursor that appears on the widget which can be an arrow, a dot etc. Common methods iconify turns the windows into icon. deiconify turns back the icon into window. state returns the current state of window. withdraw removes the window from the screen. title defines title for window. frame returns a window identifier which is system specific. Example 1: Python3 from tkinter import * root = Tk() root.geometry("200x300") root.title("main") l = Label(root, text = "This is root window") top = Toplevel() top.geometry("180x100") top.title("toplevel") l2 = Label(top, text = "This is toplevel window") l.pack() l2.pack() top.mainloop() Output Example 2: Creating Multiple toplevels over one another Python3 from tkinter import * # Create the root window # with specified size and title root = Tk() root.title("Root Window") root.geometry("450x300") # Create label for root window label1 = Label(root, text = "This is the root window") # define a function for 2nd toplevel # window which is not associated with # any parent window def open_Toplevel2(): # Create widget top2 = Toplevel() # define title for window top2.title("Toplevel2") # specify size top2.geometry("200x100") # Create label label = Label(top2, text = "This is a Toplevel2 window") # Create exit button. button = Button(top2, text = "Exit", command = top2.destroy) label.pack() button.pack() # Display until closed manually. top2.mainloop() # define a function for 1st toplevel # which is associated with root window. def open_Toplevel1(): # Create widget top1 = Toplevel(root) # Define title for window top1.title("Toplevel1") # specify size top1.geometry("200x200") # Create label label = Label(top1, text = "This is a Toplevel1 window") # Create Exit button button1 = Button(top1, text = "Exit", command = top1.destroy) # create button to open toplevel2 button2 = Button(top1, text = "open toplevel2", command = open_Toplevel2) label.pack() button2.pack() button1.pack() # Display until closed manually top1.mainloop() # Create button to open toplevel1 button = Button(root, text = "open toplevel1", command = open_Toplevel1) label1.pack() # position the button button.place(x = 155, y = 50) # Display until closed manually root.mainloop() Output Comment More infoAdvertise with us Next Article Python Tkinter - Toplevel Widget K KaranGupta5 Follow Improve Article Tags : Python Python-tkinter Python Tkinter Widget Practice Tags : python Similar Reads What are Widgets in Tkinter? Tkinter is Python's standard GUI (Graphical User Interface) package. tkinter we can use to build out interfaces - such as buttons, menus, interfaces, and various kind of entry fields and display areas. We call these elements Widgets.What are Widgets in Tkinter?In Tkinter, a widget is essentially a g 3 min read Basic Tkinter WidgetPython Tkinter - Label Tkinter Label is a widget that is used to implement display boxes where you can place text or images. The text displayed by this widget can be changed by the developer at any time you want. It is also used to perform tasks such as underlining the part of the text and spanning the text across multipl 4 min read Python Tkinter - Create Button Widget The Tkinter Button widget is a graphical control element used in Python's Tkinter library to create clickable buttons in a graphical user interface (GUI). It provides a way for users to trigger actions or events when clicked.Note: For more reference, you can read our article:What is WidgetsPython Tk 6 min read Python Tkinter - Entry Widget Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. Python with Tkinter is the fastest and easiest way to create GUI applications. Creating a GUI using Tkinter is an easy task.In Python3 Tkinter is come 5 min read Python Tkinter - Frame Widget 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 applicatio 3 min read Python Tkinter - Checkbutton Widget The Checkbutton widget is a standard Tkinter widget that is used to implement on/off selections. Checkbuttons can contain text or images. When the button is pressed, Tkinter calls that function or method. Note: For more reference, you can read our article, What is WidgetsPython Tkinter OverviewPytho 5 min read RadioButton in Tkinter | Python The Radiobutton is a standard Tkinter widget used to implement one-of-many selections. Radiobuttons can contain text or images, and you can associate a Python function or method with each button. When the button is pressed, Tkinter automatically calls that function or method.Syntax:  button = Radio 4 min read Python Tkinter - ListBox Widget Tkinter is a GUI toolkit used in python to make user-friendly GUIs.Tkinter is the most commonly used and the most basic GUI framework available in python. Tkinter uses an object-oriented approach to make GUIs. Note: For more information, refer to Python GUI â tkinter ListBox widget The ListBox widg 2 min read Python-Tkinter Scrollbar Python offers multiple options for developing a 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 applicat 3 min read Like