Yes, manipulating Tk from a child thread is problematic and can't be done directly, e.g. try launching a Dialog box from a thread and see what happens. One trick I've done in the past is to pass a reference to the parent to the child thread, then when I want to update the GUI in the parent, say a status message line, I simple set the variable behind it using the parent reference. If you're going to have multiple threads updating that could get tricky I suppose considering the variable locking, but I'm sure someone out here has done it.
Anyone? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gerardo Juarez Sent: Wednesday, September 20, 2006 9:58 AM To: [email protected] Subject: Re: [Tkinter-discuss] Minimizing a Python/Tk application Thanks Francois, Multiple threads are always trickier. On the other hand, wxpython could be the solution, but I wish it could be done in Tk, because I already have the multiplatform program written and it would save me redoing it just for Windows. And also see my previous message. Gerardo On Sat, 16 Sep 2006, francois schnell wrote: > On 16/09/06, Gerardo Juarez <[EMAIL PROTECTED]> wrote: > > > > > > > > An another question: how can I make this application appear on the tool > > bar, next to the volume control, anti-virus software and similar > > applications? I have searched and cannot find anything related. > > > I was searching for that also but I believe it's impossible with tkinter > according to this : > http://mail.python.org/pipermail/python-list/2002-September/123257.html > > > > from Tkinter import * > > root = Tk() > > root.withdraw() # Hide the window > > root.deiconify() # Unhide the window > > > > I'm using also deiconify for a windows app. It worked fine as long as I was > in the "main thread" but I had random problems when using it from another > thread (which I couldn't avoid). > > I'm trying/learning wxpython now for a proper systray control and to see how > the "deiconification from another thread" behave. > > francois > > > _______________________________________________ > > Tkinter-discuss mailing list > > [email protected] > > http://mail.python.org/mailman/listinfo/tkinter-discuss > > > _______________________________________________ Tkinter-discuss mailing list [email protected] http://mail.python.org/mailman/listinfo/tkinter-discuss _______________________________________________ Tkinter-discuss mailing list [email protected] http://mail.python.org/mailman/listinfo/tkinter-discuss
