Question about Tkinter message boxes
Joseph Andrew Knapka
jknapka at earthlink.net
Fri Aug 17 18:06:07 EDT 2001
Mike Callahan wrote:
>
> When I run this code:
>
> import tkMessageBox as tkM
> tkM.showerror('Error', 'Test messgage')
>
> I get two windows. A blank Tk box and the error box. When I click on OK in
> the error box, the blank Tk box remains. How do I keep the blank Tk box from
> appearing?
>
> Mike Callahan
Tk will always create a root window whether you want one
or not. You can create it explicitly and then hide
it at the beginning of your program:
root = Tkinter.Tk()
root.withdraw()
...then do your message-box stuff.
--
# Joe Knapka
# "You know how many remote castles there are along the
# gorges? You can't MOVE for remote castles!" - Lu Tze re. Uberwald
# 2nd Lbl A + 1 = 2nd Pause 2nd Prt A
More information about the Python-list
mailing list