[英]How will I make a tk window which cannot be minimized in Python Tkinter?
I tried win.overrideredirect(True)
it didn't work...我试过
win.overrideredirect(True)
它没有用...
My Code goes like this:我的代码是这样的:
from tkinter import *
win = Tk()
win.resizable(0,0)
win.wm_protocol("WM_SAVE_YOURSELF", lambda: print("On exit"))
Label(win, text="Tk Window").pack()
win.mainloop()
Specs: Python 3.9.6 [Latest], Pip 21.1.3, OS: Windows 10 Home规格:Python 3.9.6 [最新],Pip 21.1.3,操作系统:Windows 10 Home
I want to make the minimize button to be disabled... Please help我想让最小化按钮被禁用...请帮忙
import Tkinter as tk
root= tk.Tk()
root.title("wm min/max")
# this removes the maximize button
root.resizable(0,0)
# # if on MS Windows, this might do the trick,
# # but I wouldn't know:
# root.attributes(toolwindow=1)
# # for no window manager decorations at all:
# root.overrideredirect(1)
# # useful for something like a splash screen
root.mainloop()
try resizeable function like this :尝试像这样调整大小的功能:
win= Tk()
win.geometry("750x250")
win.resizable(False, False)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.