Skip to content
Related Articles

Related Articles

Python Tkinter – Frameless window

View Discussion
Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 16 Oct, 2021
View Discussion
Improve Article
Save Article

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 the overrideredirect() method.

Syntax:

root.overrideredirect(value)

To create a Frameless Window, we will pass value True or 1 as arguments in over ride redirect() method.

Create a Normal Window

Below is the program that creates a normal tkinter window.

Python3




# Import module
from tkinter import *
 
# Create object
root = Tk()
 
# Adjust size
root.geometry("400x400")
 
# Execute tkinter
root.mainloop()

Output:

Frame Window

Create a Frameless Window

Below is the Program to create a frameless tkinter window in python using the overrideredirect() method.

Python3




# Import module
from tkinter import *
 
# Create object
root = Tk()
 
# Adjust size
root.geometry("400x400")
 
# Use overrideredirect() method
root.overrideredirect(True)
 
# Execute tkinter
root.mainloop()

Output:

Frameless Window

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!