Next / Previous / Contents / TCC Help System / NM Tech homepage

24.3. Event types

The full set of event types is rather large, but a lot of them are not commonly used. Here are most of the ones you'll need:

ActivateA widget is changing from being inactive to being active. This refers to changes in the state option of a widget such as a button changing from inactive (grayed out) to active.
ButtonThe user pressed one of the mouse buttons. The detail part specifies which button.
ButtonReleaseThe user let up on a mouse button. This is probably a better choice in most cases than the Button event, because if the user accidentally presses the button, they can move it off the widget to avoid setting off the event.
ConfigureThe user changed the size of a widget, for example by dragging a corner or side of the window.
DeactivateA widget is changing from being active to being inactive. This refers to changes in the state option of a widget such as a radiobutton changing from active to inactive (grayed out).
DestroyA widget is being destroyed.
EnterThe user moved the mouse pointer into a visible part of a widget. (This is different than the enter key, which is a KeyPress event for a key whose name is actually "return".)
ExposeThis event occurs whenever at least some part of your application or widget becomes visible after having been covered up by another window.
FocusInA widget got the input focus (see Section 23, “Focus: routing keyboard input” for a general introduction to input focus.) This can happen either in response to a user event (like using the tab key to move focus between widgets) or programmatically (for example, your program calls the .focus_set() on a widget).
FocusOutThe input focus was moved out of a widget. As with FocusIn, the user can cause this event, or your program can cause it.
KeyPressThe user pressed a key on the keyboard. The detail part specifies which key. This keyword may be abbreviated Key.
KeyReleaseThe user let up on a key.
LeaveThe user moved the mouse pointer out of a widget.
MapA widget is being mapped, that is, made visible in the application. This will happen, for example, when you call the widget's .grid() method.
MotionThe user moved the mouse pointer entirely within a widget.
UnmapA widget is being unmapped and is no longer visible. This happens, for example, when you use the widget's .grid_remove() method.
VisibilityHappens when at least some part of the application window becomes visible on the screen.