0

very simple problem, I just try to make tkinter window that you are not able to move with the mouse. the problem is that I don't find a function that can do it, the only thing that I found is making it not resizable and stuff like that, I also found a function that hides the bar and making it not resizable or moveable, but it doesn't help me cause I still want it to have the default window bar, let's just say I have a normal window here:

import tkinter as TK
window = TK.Tk()
window.geometry('1200x800')

window.mainloop()

so just tell me if you know how to make it impossible to move the window with the mouse, how to do that, the code should work fine with fullscreen and other functionality like that by the way.

  • [look at this answer](https://stackoverflow.com/q/73671401/13629335) – Thingamabobs Nov 26 '22 at 20:01
  • no it is bad because im doing it for a game and what you show me is really buggy, i tried the code and when i do fullscreen the window just works like a virus, can you show me a code that work like in pygame, but in tkinter of course @Thingamabobs – TheGreenLightning444 Nov 26 '22 at 20:07
  • When you do fullscreen you shouldn't be able to move the window at all, cause there will be no titlebar. Are you referring to a maximized window instead? But in general, no tkinter does not offer intercepting this behavior, cause a normal user interface should be moveable and resizable. The code I have provided is for edge cases, like modal windows. – Thingamabobs Nov 26 '22 at 20:12
  • yeah because when I fullscreen that bug happens any way, without I do anything @Thingamabobs – TheGreenLightning444 Nov 26 '22 at 20:42
  • I still don't know what you are refering to. – Thingamabobs Nov 26 '22 at 21:08
  • Does this answer your question? [How to disable window movement in tkinter](https://stackoverflow.com/questions/63222193/how-to-disable-window-movement-in-tkinter) – pippo1980 Nov 26 '22 at 23:32

0 Answers0