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:
Activate | A 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. |
Button | The user pressed one of the mouse buttons.
The detail part specifies
which button. |
ButtonRelease | The 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. |
Configure | The user changed the size of a widget, for example by dragging a corner or side of the window. |
Deactivate | A 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). |
Destroy | A widget is being destroyed. |
Enter | The 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" .) |
Expose | This event occurs whenever at least some part of your application or widget becomes visible after having been covered up by another window. |
FocusIn | A 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). |
FocusOut | The input focus was moved out of a widget.
As with FocusIn , the user
can cause this event, or your program can cause
it. |
KeyPress | The user pressed a key on the keyboard. The
detail part specifies
which key. This keyword may be abbreviated
Key . |
KeyRelease | The user let up on a key. |
Leave | The user moved the mouse pointer out of a widget. |
Map | A widget is being mapped, that is, made
visible in the application. This will happen,
for example, when you call the widget's
.grid() method. |
Motion | The user moved the mouse pointer entirely within a widget. |
Unmap | A widget is being unmapped and is no longer
visible. This happens, for example, when you use
the widget's
.grid_remove()
method. |
Visibility | Happens when at least some part of the application window becomes visible on the screen. |