Tkinter: tkButtonDown, tkButtonEnter, tkButtonInvoke, tkButtonLeave, tkButtonUp

Guilherme Polo ggpolo at gmail.com
Mon Sep 1 21:34:39 EDT 2008


On Mon, Sep 1, 2008 at 10:09 PM, akineko <akineko at gmail.com> wrote:
> On Sep 1, 5:52 pm, "Guilherme Polo" <ggp... at gmail.com> wrote:
>
>> Are you trying to simulate clicks ? You should be doing it using
>> event_generate, more below.
>>
>
> Actually, I was trying to implement a "sticky" button.
> (Button Release is done later by another event)
>
> I already tried event_generate.
> It worked as far as I didn't touch other widgets.
> But somehow it failed to work if event_generate is called after other
> widgets are activated.
>
>> You should expect them to be totally removed from Tkinter actually.
>
> Sad to hear that. Controlling the button behaviour explicitly may not
> be a common thing to do but it is still necessary thing to do. But you
> gave me enough insights.

This is an illusion you have, calling those methods are not the way
for explicitly controlling button's behavior, not more than generating
proper events. The explicit way is to not use a button, instead
(ab)use Canvas.

>
> Aki-
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
-- Guilherme H. Polo Goncalves



More information about the Python-list mailing list