Home > Mobile >  tkinter fullscreen still available after root.resizable(False,False)
tkinter fullscreen still available after root.resizable(False,False)

Time:12-18

I am trying to make a python application that requires disabling the window resize and fullscreen mode. I used root.resizable(False,False) to do the work, it does stop the window from resizing. But for disabling the fullscreen mode, only if you iconify it first and then deiconify it. I wonder why and is there a workaround?

EDIT: Tried root.withdraw() and root.deiconify(), it did not work, seems only manual iconification works. I tried the same script on another test script I made, and it works without the need of withdraw and deiconify. So currently the problem only applies on the current application I am working on, no idea what is causing this.

EDIT: Found how to fix it, seems like placing objects caused this problem. Added root.withdraw() and root.deiconify() after placing object and it now works like a charm.

CodePudding user response:

According to the tk documentation, this is probably a bug in the window manager. Keep in mind that resizable is a wm command.

Most existing window managers appear to have bugs that affect the operation of the wm command. For example, some changes will not take effect if the window is already active: the window will have to be withdrawn and de-iconified in order to make the change happen.

  • Related