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.
我正在寻找一种方法来锁定窗口。我找到window.set_resizable(False)了,但是将窗口大小调整为请求的大小,然后将其锁定。我希望能够调整我的窗口大小,然后将其锁定为我调整大小的大小。
window.set_resizable(False)
也许您可以在调用之前set_size_request()使用当前窗口大小(从) ?window_get_size()set_resizable()
set_size_request()
window_get_size()
set_resizable()
你可以使用这个:
window.set_geometry_hints(window, min_width, min_height, max_width, max_height)