我在找很长时间来解决这个问题。我想删除Tk窗口的标题栏,就像函数“overridedirect()”。我的问题是,操作系统的任务栏上没有图标。 我也试过了”根.属性(“-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()
你不能为所欲为。你可以没有标题栏和图标,也可以有一个标题栏和图标。没有另一个是不可能得到一个的。在
相关问题 更多 >
编程相关推荐