【发布时间】:2017-06-03 22:07:47
【问题描述】:
我刚刚学习 python,我正在尝试让一个窗口全屏显示,我已经实现了,但我现在想摆脱顶部的标题栏。它目前看起来像下面的图像,但我希望它也可以越过顶部的 Mac 顶部工具栏(如启动屏幕)。
from tkinter import *
root = Tk()
root.attributes('-fullscreen', True)
root.attributes('-topmost', True)
root.overrideredirect(True)
def quitApp():
# mlabel = Label (root, text = 'Close').pack()
root.destroy()
# placing the button on my window
button = Button(text = 'QUIT', command = quitApp).pack()
【问题讨论】:
-
overrideredirect 方法适用于 windows,但不确定如何/是否适用于 mac。
-
我试过了,但没有做任何事情(也许我做错了)
标签: python macos python-2.7 tkinter fullscreen