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: > > > [...] > > > > > > > FWIW,

Re: Tkinter ttk Treeview binding responds to past events!

2023-09-12 Thread MRAB via Python-list
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: > My issue is solved, but I'm still curious about what is happening > here. MRAB already said it: When you enter

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 callback function, Tk's > mainloop waits

Re: Tkinter ttk Treeview binding responds to past events!

2023-09-12 Thread Rob Cliffe via Python-list
On 12/09/2023 19:51, Mirko via Python-list wrote: I have also found that after() is a cure for some ills, though I avoid using it more than I have to because it feels ... a bit fragile, perhaps. Yeah. Though for me it was the delay which made it seem fragile. With a 0 delay, this looks

Re: Tkinter ttk Treeview binding responds to past events!

2023-09-12 Thread MRAB via Python-list
On 2023-09-12 19:51, 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 callback function, Tk's mainloop waits for it to return. So what's

Re: Tkinter ttk Treeview binding responds to past events!

2023-09-12 Thread Mirko via Python-list
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 callback function, Tk's mainloop waits for it to return. So what's happening is: 1. Tk's mainloop pauses 2.

Re: Tkinter ttk Treeview binding responds to past events!

2023-09-12 Thread MRAB via Python-list
On 2023-09-12 06:43, John O'Hagan via Python-list wrote: 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

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 tkinter.ttk import * > > > > root=Tk() > > > > def

Re: Tkinter ttk Treeview binding responds to past events!

2023-09-11 Thread Rob Cliffe via Python-list
On 11/09/2023 21:25, 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 tkinter.ttk import * root=Tk() def callback(*e):      print('called') tree =

Re: Tkinter ttk Treeview binding responds to past events!

2023-09-11 Thread Mirko via Python-list
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 tkinter.ttk import * root=Tk() def callback(*e):     print('called') tree = Treeview(root) tree.pack() iid = tree.insert('', 0,

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)