[Tkinter-discuss] Minimizing a Python/Tk application
gerardo at computo-industrial.com.mx
Wed Sep 20 19:36:20 CEST 2006
I just found it! What I want is to run the application minimized and to
see the controls only when I need to reconfigure its behaviour. I searched
for the function that you mention and found that it must be iconify().
root = Tk()
withdraw() removes the window from the screen altogether and probably is
the right choice for a Toplevel window you don't need anymore, but which
can be recalled with a button from the main window that's still displayed.
Which is what you were talking about.
Thanks for the tip.
On Wed, 20 Sep 2006, Metz, Bobby W, WWCS wrote:
> What type of window are you displaying? It sounds like you're tying the
> withdraw code to a button or something for a user to click; otherwise,
> you would have some event or other sub-routine that fires the deiconify
> later based on conditions or program flow. In my example below, as long
> as you have a variable pointing to the window you can call the deiconify
> at any time. If there is a simple minimize instead of hide...I don't
> remember what that function is.
> -----Original Message-----
> From: tkinter-discuss-bounces+bwmetz=att.com at python.org
> [mailto:tkinter-discuss-bounces+bwmetz=att.com at python.org] On Behalf Of
> Gerardo Juarez
> Sent: Wednesday, September 20, 2006 9:52 AM
> To: tkinter-discuss at python.org
> Subject: Re: [Tkinter-discuss] Minimizing a Python/Tk application
> Thanks, it works, but, once the application is minimized I don't have
> way to access it -to tell it to deiconify itself for example. I doesn't
> use a console window. Is killing it the only option?
> On Fri, 15 Sep 2006, Metz, Bobby W, WWCS wrote:
> > use the withdraw() function, e.g.
> > from Tkinter import *
> > root = Tk()
> > root.withdraw() # Hide the window
> > root.deiconify() # Unhide the window
> > Bobby
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
More information about the Tkinter-discuss