0

I have a simple tkinter app and I want to hide the titlebar. I am doing that via:

root.overrideredirect(True)

and that works fine. However, the resulting window has no icon in the taskbar and when switching the windows using Alt + Tab the window does not appear. I created an exe file using Pyinstaller and was hoping that would solve the issue but it doesn't. Is there a way to to fix this?

Another_coder
  • 728
  • 1
  • 9
  • 23
  • Have you seen https://stackoverflow.com/q/72197214/13629335 ? – Thingamabobs Dec 18 '22 at 21:03
  • Nevermind, the issue was partially solved here: https://stackoverflow.com/questions/73001768/tkinter-make-overrideredirect-window-appear-on-top-of-other-windows-when-clicked (only for windows though) – Another_coder Dec 18 '22 at 21:11

1 Answers1

0

To remove the title bar of a Tkinter window, we can use wm_attributes('type', 'value') method by specifying the type of property. In the following example, we will use 'fullscreen', a Boolean value that removes the title bar of the window.

from tkinter import *

win = Tk()
win.geometry("700x350")

label= Label(win, text="Hello world", font= ('Helvetica 14 bold'), foreground= "red3")
label.pack()

win.wm_attributes('-fullscreen', 'True')
win.mainloop()
Gunesh Shanbhag
  • 559
  • 5
  • 13