Events are what happen in TK when a button is pressed, the cursor moves over your window, or your window resizes...amongst other things. Some events (such as a subtle change of colour as you move over a button) are provided by default. You provide action for other events (such as button presses) when you define the button, and there's a final class of events that you can add once you've completed definition of a widget. In this module, you'll learn how to define your own events handlers, bind them to particular events, override system events if need be, and more.
This topic is presented on public courses
Tcl/Tk,
Extra Day
Examples from our training material
| caneve | binding canvas events and keys |
| tkbb | Button binding example |
| tke2 | Events to toggle text on a widget |
| tke3 | Button bindings to a single proc |
| tke5 | button binding for all keys, down and up |
| tke6 | Keysym tester |
Background information
Some modules are
available for download as a sample of our material or under an
Open Training Notes License for free download from
http://www.training-notes.co.uk.
Topics covered in this module
Binding tags and events.
Binding Tags.
Events.
Keys and Buttons.
Mouse Movements.
Window Happenings.
OS Specific.
Event keywords.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our
Listing and schedule page.
Well House Consultants specialise in training courses in
Tcl/Tk, Expect,
Python,
Perl,
PHP, and
MySQL. We run
Private Courses throughout the UK (and beyond for longer courses), and
Public Courses at our training centre in Melksham, Wiltshire, England.
It's surprisingly cost effective to come on our public courses -
even if
you live in a different
country or continent to us.
We have a technical library of over 600 books on the subjects on which we teach.
These books are available for reference at our training centre. Also
available is the Opentalk
Forum for discussion of technical questions.