Tkinter w.destroy() blocks/resets window resize

余生长醉 提交于 2019-12-04 21:49:40
pez

I did not try your code, but I had the same problem with my own project.

The window wasn't just resizing/resetting on destroy(); the <Configure> event was seemingly interrupted. The window always reverted back to the very first <Configure> call back no matter how much or how little I resized. Because of that, or along with that, Button-1 was automatically releasing, preventing the window resize grip from following the mouse.

In other words, the window edge was "slipping out" from under the mouse, much like a scrollbar in Windows will reset mid-scroll when the mouse moves too far from it.

Anyways, a solution is to use ttk.Sizegrip and prohibit resizing the top level window with the window borders.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!