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. |