0

I am making a program where at a point when user pressed exit, a Prompt comes (which is another tkinter window). But the problem I am facing is user can still access the Parent window, resulting in all operations. Is there any way in which if the user clicks the parent window while the prompt is on his screen, the prompt will blink and no widget is accessible on previous window?

I see another answer but it doesnt solve my Problem

AwesomeSam
  • 153
  • 1
  • 16
  • Well...You could hide the root window with `root.withdraw()` and use `root.deiconify()` to bring it back up. – Delrius Euphoria Nov 10 '20 at 12:33
  • 1
    Does this answer your question? [Disable the underlying window when a popup is created in Python TKinter](https://stackoverflow.com/questions/15363923/disable-the-underlying-window-when-a-popup-is-created-in-python-tkinter) – Flavio Moraes Nov 10 '20 at 13:03
  • @FlavioMoraes I tried it already, I get the following Error: `_tkinter.TclError: grab failed: another application has grab`. I can still access the main window. – AwesomeSam Nov 11 '20 at 14:16
  • @SamakshGupta, please create a new question with the code you've tried and the error. Anyway I suspect you are trying do grab a window that is not grabbable... tkinter can only grab a window that has been mapped on the screen. – Flavio Moraes Nov 11 '20 at 15:22
  • @FlavioMoraes Thank You for your help and advice, Here is the new question: https://stackoverflow.com/questions/64797477/grab-set-function-not-working-in-tkinter – AwesomeSam Nov 12 '20 at 03:29

0 Answers0