使用Python 2和Tkinter,如何在没有窗口上方标题栏的情况下启动Tk窗口?
from Tkinter import *
root = Tk()
frame = Frame(root)
frame.pack()
bottomframe = Frame(root)
bottomframe.pack( side = BOTTOM )
redbutton = Button(frame, text="Red", fg="red")
redbutton.pack( side = LEFT)
greenbutton = Button(frame, text="Brown", fg="brown")
greenbutton.pack( side = LEFT )
bluebutton = Button(frame, text="Blue", fg="blue")
bluebutton.pack( side = LEFT )
blackbutton = Button(bottomframe, text="Black", fg="black")
blackbutton.pack( side = BOTTOM)
root.mainloop()
答案 0 :(得分:2)
您可以使用.overrideredirect()从Tkinter窗口(Tk
或Toplevel
)删除所有装饰:
root = Tk()
root.overrideredirect(True)