There's a function in the Python programming language, in particular in its tkinter module, that is called grab_set, which basically allows a Toplevel window to take complete control over the keyword and mouse events, so that these events are not sent to wrong windows. If you are interested, you can find more information in this article:


Now, someone told me that the correct expression related to this method was "setting the grab on a window", but it is not completely clear what it means, even if from the context I can imagine more or less its meaning.

See this article for context:


Is this a common expression? What exactly does it mean? In which contexts can I use it?

Examples are appreciated.

  • 1
    This is not an ordinary English idiom. It looks to me like a back-formation from a Python function name; although the components are all ordinary words they construct a readily intelligible but non-idiomatic sense. I have grave doubts whether this should be regarded as English at all; it is rather a term in a programming language derived from English. To the extent that it is English, it is a 'term of art' peculiar to Python programmers. Aug 28, 2015 at 1:02
  • In English we "make a grab at/for" something. "Set the grab on" something is not an English language expression.
    – user20792
    Aug 28, 2015 at 1:11
  • We often see verbs turned into nouns in jargon. The "grab". The "ask".
    – TimR
    Aug 28, 2015 at 1:50

1 Answer 1


This is technical jargon and does not sound natural in English except in the very specific context it came from.

Window systems (GUIs) have the concept of "focus", i.e., the part of the screen that you are currently interacting with (where your keystrokes go). Sometimes people say that a particular window or UI element "has focus".

Usually focus is controlled by the user, but sometimes the program wants to direct the user's interaction to a particular thing. This is sometimes called "grabbing (the) focus", especially in X Window system environments (where Tkinter originated).

The "grab_set" methods sets a flag on the dialog window, requesting that it grab focus away from its parent window.

So, "setting the grab" here is a very shorthand way of saying "setting the flag/attribute that requests the window system to grab focus for this window when it is displayed".

You must log in to answer this question.