Re: Tkinter ttk Treeview binding responds to past events!

2023-09-12 Thread John O'Hagan via Python-list
On Wed, 2023-09-13 at 01:33 +0100, MRAB via Python-list wrote: > On 2023-09-13 00:40, John O'Hagan via Python-list wrote: > > On Tue, 2023-09-12 at 20:51 +0200, Mirko via Python-list wrote: > > > Am 12.09.23 um 07:43 schrieb John O'Hagan via Python-list: > >

Re: Tkinter ttk Treeview binding responds to past events!

2023-09-12 Thread John O'Hagan via Python-list
On Tue, 2023-09-12 at 20:51 +0200, Mirko via Python-list wrote: > Am 12.09.23 um 07:43 schrieb John O'Hagan via Python-list: > > > My issue is solved, but I'm still curious about what is happening > > here. > > MRAB already said it: When you enter the callbac

Re: Tkinter ttk Treeview binding responds to past events!

2023-09-12 Thread John O'Hagan via Python-list
On Mon, 2023-09-11 at 22:25 +0200, Mirko via Python-list wrote: > Am 11.09.23 um 14:30 schrieb John O'Hagan via Python-list: > > I was surprised that the code below prints 'called' three times. > > > > > > from tkinter import * > > from tkin

Tkinter ttk Treeview binding responds to past events!

2023-09-11 Thread John O'Hagan via Python-list
I was surprised that the code below prints 'called' three times. from tkinter import * from tkinter.ttk import * root=Tk() def callback(*e):     print('called') tree = Treeview(root) tree.pack() iid = tree.insert('', 0, text='test') tree.selection_set(iid) tree.selection_remove(iid) tree.sel