12.07.2015 Views

Tkinter reference: A GUI for Python

Tkinter reference: A GUI for Python

Tkinter reference: A GUI for Python

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

EnterExposeFocusInFocusOutKeyPressKeyReleaseLeaveMapMotionUnmapVisibilityThe user moved the mouse pointer into a visiblepart of a widget. (This is different than the ENTERkey, which is a KeyPress event <strong>for</strong> a key whosename is actually "return".)This event occurs whenever at least some part ofyour application or widget becomes visible afterhaving been covered up by another window.A widget got the input focus. (See Focus, above,<strong>for</strong> a general introduction to input focus.) Thiscan happen either in response to a user event (likeusing the TAB key to move focus between widgets)or programmatically (<strong>for</strong> example, your programcalls the .focus_set() on a widget).The input focus was moved out of a widget. Again,the user can cause this event, or your program cancause it.The user pressed a key on the keyboard. The detailpart specifies which key. This keyword may beabbreviated Key.The user let up on a key.The user moved the mouse pointer out of a widget.A widget is being mapped, that is, made visiblein the application. This will happen, <strong>for</strong> example,when you call the widget’s .grid() method.The user moved the mouse pointer entirely withina widget.A widget is being unmapped and is no longer visible.This happens, <strong>for</strong> example, when you use thewidget’s .grid_remove() method.Happens when at least some part of the applicationwindow becomes visible on the screen.22.4 Event modifiersThe modifier names that you can use in event sequences include:AltAnyControlDoubleLockShiftTripleThe user is holding the ALT key down.This modifier generalizes an event type. For example,the event pattern applies tothe pressing of any key.The user is holding the CONTROL key down.Specifies two events happening close together intime. For example, describestwo presses of button 1 in rapid succesion.The user has pressed SHIFT LOCK.The user is holding the SHIFT key down.Like Double, but specifies three events in rapidsuccession.You can use shorter <strong>for</strong>ms of the events. Here are some examples: is the same as .x is the same as .New Mexico Tech Computer Center <strong>Tkinter</strong> <strong>reference</strong>: Events Page 79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!