Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我很好奇是否有办法让我在 python 中的程序具有锁定大小。我的意思是您不能拉伸窗口以使其更大或更小等。希望我已经让自己清楚,并希望在 Python 中可以实现类似的东西。谢谢
root.resizable(0, 0) #or root.resizable(width=FALSE, height=FALSE)
像一块馅饼一样容易!
或者您可以执行以下操作:
root.minsize(min_x, min_y) root.maxsize(max_x, max_y)
您仍然可以抓住窗户的一侧,但不能拉伸它。