[英]Python Tkinter delete title bar
我正在寻找很长一段时间的解决方案。 我想删除Tk窗口的标题栏,就像使用函数“ overridedirect()”一样。 我对该功能的问题是,操作系统的任务栏上没有图标。 我还尝试了使用“ root.attributes(”-fullscreen“,1)”并尝试将其缩小,但这也不起作用。 我希望有人知道一个好的解决方案,谢谢您的帮助!
我的代码现在看起来像这样:
from tkinter import *
class Main(Frame):
def __init__(self, root):
**...**
#There are more classes after this one, but defined the same way
def main():
root = Tk()
root.geometry("800x400+0+0")
root.minsize(700, 400)
root.title("Title")
#root.overrideredirect(True)
#root.iconify()
##root.attributes('-topmost', 1)
##root.attributes("-fullscreen", 1)
##root.wm_state("zoomed")
if __name__ == "__main__":
main()
你不能做你想做的。 您可以没有标题栏和图标,也可以有标题栏和图标。 没有其他人就无法获得一个。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.