next up previous
Next: Widgets Up: An introduction to Previous: An introduction to

Tk is event based

Tk is event based. This means that everything that happens is a reaction to an action of the user. Most of the time, the program is in some suspended state, waiting for the user to give some input. When the user gives some input, it is called an event. It's not known in advance what kind of event that will be; the user can pull down a menu, push a button, push another button, scroll a part of a window, enter some value in an entrybox or something else. Each important event should be handled by some piece of code. Telling Tk which code to handle which event is called binding of code to events. Event based programs require an other way of thinking and programming than a serial program does.



SE Praktikum
Tue Aug 13 13:33:30 MET DST 1996