[Tkinter-discuss] How to dettach a Toplevel

Michael Lange klappnase at web.de
Wed Nov 29 17:53:04 CET 2006

On Tue, 28 Nov 2006 14:02:46 -0800 (PST)
Sorin Schwimmer <sxn02 at yahoo.com> wrote:

> Hi Michael,
> I see your point, but this is not what I am looking for. What I'm trying to achieve goes on the
> following lines: the user has a GUI and works. A daemon (I'm on Linux) receives a message
> for the user, so it pops-up a little notification symbol (there is actualy a bit more inter-process
> communication, but it is not relevant for the GUI part). If the user checks right away what's
> going on, then the pop-up dissapears. But (s)he may decide to check later, and even decide to
> close the application; the symbol needs to stay there.
> My symbol is not intrusive, is a little undecorated window, the size of the "close", "restore",
> and "minimise" buttons, and I place it close to them. It is on a red background, so it attracts
> attention, but the user can work with it there without problems.
> That's why I need to "dettach" it.

Hi Sorin,

But then I think you will either have to make the daemon an application running independently from
the gui, so it can use its own Tk() window (and run on when the gui app was closed)
or (as I suggested) make the main gui window a Toplevel() with an invisible Tk window;
I do not see the problem, if the user closes the gui, the app is still running, so
the notification symbol may still be visible. Or am I missing something?


More information about the Tkinter-discuss mailing list