Quick question, is there any way I can prevent a Tkinter window from being moved by the mouse? I couldn't seem to find any answers on google so I'm asking my own question. Thanks in advance!
Asked
Active
Viewed 239 times
1
-
You may could refer to [this question](https://stackoverflow.com/questions/60671011/disable-window-move-in-tkinter-python). – jizhihaoSAMA Aug 03 '20 at 00:37
-
I have seen this but I couldn't see how the answer helps – Jayden Collis Aug 03 '20 at 00:46
1 Answers
0
A way to do this is by Using
Overrideredirect(1)
However this will ignore completely all window functions from the os window manager. If you want the rest of the functions you will have to create a new fake window title bar yourself and assign all the functionalities you need (window close, minimize, maximize)

qeiynn
- 43
- 6
-
-
Have a look here. A little old post but I am sure it can help, or you can look for similar examples around. [https://stackoverflow.com/questions/23836000/can-i-change-the-title-bar-in-tkinter#23836427] – qeiynn Aug 03 '20 at 00:54
-
I feel like this solution is unoptimal. I'll just add a close window button – Jayden Collis Aug 03 '20 at 01:02