ANN: Thinking in Tkinter

Stephen Ferg steve at
Wed Sep 11 10:41:29 EDT 2002

> I don't 
> know of any event binding that does a proper job of emulating the 
> standard behavior of pressing a button. Button(command=...) 
> is the way to go for this.

I think I found out why.  At
 -- under "Button>Default Bindings" -- I found this :

   "[3] If mouse button 1 is pressed over a button and later 
   released over the button, the button is invoked. However, 
   if the mouse is not over the button when button 1 is 
   released, then no invocation occurs."

I take it that this default binding is what "command" is 
attached to.

So no combination of "bind()" statements (well, no *easily coded*
combination of bind() and callback logic) can emulate this behavior.

More information about the Python-list mailing list