简体   繁体   English

全屏 Windows 与 Tkinter

[英]Fullscreen Windows with Tkinter

How can one get a frame in Tkinter to display in fullscreen mode?如何让 Tkinter 中的帧以全屏模式显示?

I'm working on a program that will have two windows.我正在开发一个有两个 windows 的程序。 The main window will house the settings options, and the 2nd window will open at a specific time and should be displayed in fullscreen mode.主 window 将包含设置选项,第二个 window 将在特定时间打开并应以全屏模式显示。

This worked pretty well for me:这对我来说效果很好:

>>> import Tkinter
>>> root = Tkinter.Tk()
>>> root.overrideredirect(True)
>>> root.geometry("{0}x{1}+0+0".format(root.winfo_screenwidth(),
                                       root.winfo_screenheight()))

I'm using OS X -- the title bar and top-level menu bar remained, but the window covered the dock.我使用的是 OS X——标题栏和顶级菜单栏仍然存在,但 window 覆盖了扩展坞。 Let me know if you need more.如果您需要更多,请告诉我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM