Tkinter: Calling Destroy() During Resize Resets The Window To Original Shape
In a Tkinter GUI, during window resizing at runtime, I've noticed that the removal of a widget or a frame, using my_widget.destroy(), resets the window size to the original shape (
Solution 1:
Hey I know it's a long time, but I just ran into this in python 3.7 on windows 10 and my workaround is to use: https://stackoverflow.com/a/41930736/7281120
if win32api.GetKeyState(0x01) >= 0:
for widget in self.winfo_children():
widget.destroy()
to prevent destruction when the mousebutton 1 is pressed. It's a hack but it appears to work.
Post a Comment for "Tkinter: Calling Destroy() During Resize Resets The Window To Original Shape"