ANN: Thinking in Tkinter

Steve Holden sholden at
Mon Sep 9 15:59:08 EDT 2002

"Stephen Ferg" <steve at> wrote in message
news:b16e4ef7.0209090552.3ad7691b at
> > you'd better include a clear warning...
> > that you'll explain how to do it correctly
> > later...
> Can you say a little more?  What is it that makes using "bind()"
> incorrect?   And what is it about using "command" that avoids the
> problems?
> This is a genuine request for information, not a challenge to your
> statement.  I am still learning about Tkinter features.

The problem, from a learner's point of view, is that most Tkinter widgets
need to be bound to a number of different events. Consider, for example, how
the default button in an interface is triggered by an Enter keystroke.

The command option is specifically provided to allow the programmer to hook
their code in whenever any relevant bound event triggers that widget in the

Consequently, which bind() is a valuable technique for Tkinter programmers
to know about, it's rather like teaching someone to drive by explaining the
mechanical details of the steering and engine.

Steve Holden                        
Python Web Programming       
Previous .sig file retired to          

More information about the Python-list mailing list