tkinter button state = DISABLED

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed May 16 15:11:52 EDT 2007


En Wed, 16 May 2007 03:22:17 -0300, Hendrik van Rooyen  
<mail at microcorp.co.za> escribió:

>  "Gabriel Genellina" <gagsl-py2 at yahoo.com.ar> wrote:
>
>> Maybe there is a confusion here. You code above means that, when the  
>> event
>> "The leftmost MOUSE BUTTON was released" happens over your BUTTON WIDGET
>> b, your function will be called.
>
> I have never seen this working in Tkinter, unless the button was pressed  
> on the
> widget
> in question - and worse, once you have clicked down on a ButtonRelease  
> binding
> you can move the mouse pointer anywhere you like, even out of the  
> application
> and when you release it, the bound function is called...
>
> Its either a bug or a feature, I don't know.

Uhmm... I'm not sure I understand you completely. I only said that the  
"command" is fired only when the mouse button is pressed on the widget,  
AND released inside the same widget. If both events don't happen in the  
same widget, "command" won't fire. Maybe you are saying the same thing...  
anyway I'm not a Tk expert.

-- 
Gabriel Genellina




More information about the Python-list mailing list