How to Create Frameless Window in tkinter
If You Want to Create Frameless Window You can Use overrideredirect() Method.
Syntax: win.overrideredirect(value)
Value is True or False / It can be 1 or 0.
from tkinter import *
win= Tk()
win.title("Frameless Window")
win.geometry("800x350+450+86")
win.config(bg="#CAFF70")
lbl= Label(win, text= "I Am Now In a Frameless Window", font=("Time New Roman",
win= Tk()
win.title("Frameless Window")
win.geometry("800x350+450+86")
win.config(bg="#CAFF70")
lbl= Label(win, text= "I Am Now In a Frameless Window", font=("Time New Roman",
35,"bold"), bg="#CAFF70",fg="red", anchor= "c")
lbl.pack(pady=60)
win.overrideredirect(True) # If you use True then frameless window can be seen
#win.overrideredirect(False) # If you use False then frameless window can not be seen
win.mainloop()
lbl.pack(pady=60)
win.overrideredirect(True) # If you use True then frameless window can be seen
#win.overrideredirect(False) # If you use False then frameless window can not be seen
win.mainloop()
Write Down Code Your Code Editor. To show Your Output. If Use Pycharm Press Shift+F10 and Show Your Output.
Lets Enjoy..............
Post a Comment