Terry J. Reedy added the comment:

I cannot reproduce the claimed bug on Win 10, 2.7.13 and 3.6.2, 64 bit amd 
versions.  Running the code above from console or IDLE, I see no difference.  
Button press selects item, add blue background.  Release changes nothing.

Here is a minimal demo that runs on both 2 and 3.

try:
    import tkinter as tk
    from tkinter import ttk
except:
    import Tkinter as tk
    import ttk

def down(event): print('down')
def up(event): print('up')

app = tk.Tk()
app.bind('<Button-1>', down)
app.bind('<ButtonRelease-1>', up)
app.mainloop()

Button down prints 'down', button up prints 'up'.  No bug.

Replace the binds with

label = ttk.Label(app, text='test')
label.pack()
label.bind('<Button-1>', down)
label.bind('<ButtonRelease-1>', up)

and I see the same expected behavior.

----------
components: +Tkinter -Windows
nosy: +serhiy.storchaka, terry.reedy -paul.moore, steve.dower, tim.golden, 
zach.ware

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31483>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to