TKinter question (hiding the main window)

G. Willoughby thecalm at NOSPAM.btinternet.com
Wed Aug 15 18:48:22 EDT 2001


try these methods:

root.iconify()           to minimise the window
root.deiconify()       to bring it back

or

root.withdraw()       to 'minimise' it but not put a icon anywhere (windows
program bar)
root.deiconify()       to bring it back

or

root.destroy()          to completely get rid of it!

hope that helps  :)

G. Willoughby.

"Andrew" <akaspick at sympatico.ca> wrote in message
news:DQ0b7.74771$Q13.4979011 at news20.bellglobal.com...
> Hello,
>
> I'm new to python and tkinter and have a quick question.  In the following
> code I want the file dialog to show, but not the main tkinter window that
is
> displayed.  The code sample is the only way I was able to get things to
work
> so far.
>
> Thanks,
> Andrew
>
>
> from Tkinter import *
>
> root = Tk()
>
> fileName = askopenfilename()
>
> root.mainloop()
>
>





More information about the Python-list mailing list