This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author HobbyScript
Recipients HobbyScript, paul.moore, steve.dower, tim.golden, zach.ware
Date 2017-09-15.13:17:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1505481451.72.0.943425151923.issue31483@psf.upfronthosting.co.za>
In-reply-to
Content
On my version of python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)]

As well as on 3.6.2 for some other users I have spoken to there seams to be an issue with the event for pressing the mouse button down.

The event <Button-1> or <ButtonPress-1> do not fire when the mouse button is pressed but rather when the mouse button is released.

The following example code works fine on 2.7 but the button event is not working properly on at lease my version and 3.6.2

import Tkinter as tk
import ttk

app = tk.Tk()
t = ttk.Treeview(app)
t.pack(side="top",fill="both",expand=1)

scrolling = False
xscroll = tk.Scrollbar(app,command=t.xview,orient="horizontal")
t.configure(xscrollcommand=xscroll.set)
xscroll.pack(side="top",fill="x")

def scrolling_active(arrow, *args):
    global scrolling
    if scrolling == True:
        if arrow == "arrow1":
            t.xview('scroll', -5, 'units')
        if arrow == "arrow2":
            t.xview('scroll', 5, 'units')
        app.after(5, lambda a = arrow: scrolling_active(a))

def start_scrolling(event):
    global scrolling
    scrolling = True
    scrolling_active(xscroll.identify(event.x, event.y))

def stop_scrolling(event):
    global scrolling
    scrolling = False

xscroll.bind("<Button-1>", start_scrolling)
xscroll.bind('<ButtonRelease-1>', stop_scrolling)

tcols = ["header " + str(i)
         for i in range(50)]
t.config(columns=tcols)
for h in tcols:
    t.heading(h,text=h)

for i in range(5):
    t.insert("","end",
             text = "item" + str(i),
             values = ["value" + str(x) for x in range(49)])
app.geometry("{}x{}".format(400, 300))

app.mainloop()
History
Date User Action Args
2017-09-15 13:17:31HobbyScriptsetrecipients: + HobbyScript, paul.moore, tim.golden, zach.ware, steve.dower
2017-09-15 13:17:31HobbyScriptsetmessageid: <1505481451.72.0.943425151923.issue31483@psf.upfronthosting.co.za>
2017-09-15 13:17:31HobbyScriptlinkissue31483 messages
2017-09-15 13:17:31HobbyScriptcreate