Marco Herrarte
Marco Herrarte

Reputation: 1620

Prevent accessing other windows until the current window is closed

I'm writing a GUI, and in this GUI there have to be several windows for editing a config file.

What I want is that users can't use other windows until the active window is close.

Upvotes: 1

Views: 433

Answers (1)

Bryan Oakley
Bryan Oakley

Reputation: 385970

The way to do this is to do a "grab" on a window, which will force all events to go to that window. The command to do this is grab_set. If you search for [tkinter] grab_set on this site you'll find answers with examples.

Upvotes: 1

Related Questions