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 use theoverrideredirect()method.
Syntax:
root.overrideredirect(value)
To create a Frameless Window, we will pass valueTrueor 1as arguments inover ride redirect()method.
Create a Normal Window
Below is the program that creates a normaltkinter window.
Python3# Import modulefromtkinterimport*# Create objectroot=Tk()# Adjust sizeroot.geometry("400x400")# Execute tkinterroot.mainloop()
Output:
Frame WindowCreate a Frameless Window
Below is the Program to create a framelesstkinter window in python using theoverrideredirect()method.
Python3# Import modulefromtkinterimport*# Create objectroot=Tk()# Adjust sizeroot.geometry("400x400")# Use overrideredirect() methodroot.overrideredirect(True)# Execute tkinterroot.mainloop()
Output:
Frameless Window