[Tutor] Creating simple windows in XP
W W
srilyk at gmail.com
Fri Jan 16 19:10:40 CET 2009
On Thu, Jan 15, 2009 at 5:45 PM, Alan Gauld <alan.gauld at btinternet.com>wrote:
> You mean like doing
>
> import tkMessageBox
> tkMessageBox.showinfo("Window Text", "A short message")
>
> in Tkinter? :-)
>
> OR
>
> res = tkMessageBox.askokcancel("Which?", "Ready to stop?")
> print res
>
> At that level Tkinter is pretty easy too.
After trying that and getting the mildly annoying root window to pop up I
did a quick search and found how to hide that window.
from Tkinter import Tk
root = Tk()
root.withdraw()
tkMessageBox.showinfo("Window", "Root window is gone!")
If you need it back, root.deiconfiy() will show the window again.
HTH,
Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090116/3a1d5193/attachment-0001.htm>
More information about the Tutor
mailing list