O'Reilly logo

Tkinter GUI Programming by Example by David Love

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tkinter's event system

Each time the user interacts with a program in some way—usually via the use of a mouse and keyboard—an event is sent to the application. It is these events that cause things to happen, such as the letters appearing on my screen as I press keys on the keyboard while writing this book.

Tkinter's widgets have a default behavior for certain keys, and the operating system you are using will have default behaviors too. For example, Alt + F4 will close the active window on a lot of operating systems, unless specifically unbound from this action.

When writing an application using Tkinter, there is a very simple and succinct API which allows the programmer to listen for keyboard presses or mouse movement and execute code in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required