The event types

The general format for representing an event is as follows:

<[event modifier-]...event type [-event detail]>

It is compulsory to specify the event types for any event binding. Also note that event types, event modifier, and event details vary across platforms. The following table represents event types with their description:

Event type

Description

Activate

Change in the state option of a widget from inactive (grayed out) to active.

Button

Press of a mouse button. The event detail part specifies which button.

ButtonRelease

Release of a pressed mouse button.

Configure

Change of size of a widget.

Deactivate

Change in the state option of a widget from active to inactive (grayed out).

Destroy

Destruction of a widget using the widget.destroy method.

Enter

Mouse pointer enters a visible part of a widget.

Expose

At least some part of widget becomes visible after remaining covered by another window.

FocusIn

Widget gets input focus either due to a user event (like using the Tab key or mouse click) or on call of .focus_set() on a widget

FocusOut

Focus moved out of a widget.

KeyPress/Key

Press of a key on the keyboard. The event-detail part specifies which key.

KeyRelease

Release of a pressed key.

Leave

Mouse pointer moves out of a widget.

Map

Widget is mapped (made visible). Occurs say when you call a geometry manager on a widget.

Motion

Mouse pointer moves entirely within a widget.

Un-map

Widget is unmapped (made invisible). For example, when you use the remove() method.

Visibility

At least a part of the window becomes visible.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.97.170