Get rid of toplevel tk panewindow and usong tkMessageBox

link text

When I do this:

tkMessageBox.askquestion(title="Symbol Display",message="Is the symbol visible on the console") 

as well as the Symbol Display window.

If I click "Yes" ... the child window will return yes, while the tk window will remain there.

Whenever I try to close the tk window, End Program - tk appears. when you click the "End Now" button in the "pythonw.exe" window, a request appears to send a bug report or not.

Why is that? How can I avoid the appearance of the tk window without affecting the execution of the script ???

+4
source share
1 answer

The trick is to call the output at the top level of the root of Tk:

 >>> import tkMessageBox, Tkinter >>> Tkinter.Tk().withdraw() >>> tkMessageBox.askquestion( ... title="Symbol Display", ... message="Is the symbol visible on the console") 
+5
source

All Articles