Thank you, it worked! Vasilis
________________________________________ From: Tkinter-discuss [tkinter-discuss-bounces+vasilis.vlachoudis=cern...@python.org] on behalf of Michael Lange [klappn...@web.de] Sent: 07 February 2014 19:37 To: tkinter-discuss@python.org Subject: Re: [Tkinter-discuss] Interrupt a long process Hi, On Fri, 7 Feb 2014 16:46:58 +0000 Vasilis Vlachoudis <vasilis.vlachou...@cern.ch> wrote: > Hi all, > > in my canvas sometimes it happens to have a long process to insert lots > of items. > > This typically takes a lot of time (up to min) so I want to give the > possibility to the user to interrupt this process. > And since I am adding to the Canvas I cannot push it on a thread. > > So in the main thread, in the big loop, once I exceed a certain time > I display a button to interrupt the long process and I call the > update_idletasks() periodically. However it is not possible for the > user to click on the button. > > It seems that the update_idletasks doesn't update the "Button-1" > messages How can I do it? sounds like this is one of the rare cases where you will have to use update() instead of update_idletasks() Regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. We Klingons believe as you do -- the sick should die. Only the strong should live. -- Kras, "Friday's Child", stardate 3497.2 _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org https://mail.python.org/mailman/listinfo/tkinter-discuss _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org https://mail.python.org/mailman/listinfo/tkinter-discuss