简体   繁体   中英

Program Window Lock in Tkinter

I was curious if there was a way to make my program in python to have a locked size. What I mean by that is that you can't stretch the window to make it larger or smaller etc. Hopefully I've made myself clear and hopefully something of the like is possible in Python. Thanks

root.resizable(0, 0) #or root.resizable(width=FALSE, height=FALSE)

Easy as a piece of pie!

Or you could do the following:

root.minsize(min_x, min_y)
root.maxsize(max_x, max_y)

You will still be able to grab the side of the window but you can't stretch it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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