tkMessageBox dialog help

N

Nathan

Hi,

I've been testing the standard dialog boxes in tkMessageBox under IDLE.
If I type for example, tkMessageBox.askyesno('test', 'test'), the dialog box
comes up fine but another window also appears. I'm guessing this is the
parent window of the message box. If I click on either of the yes/no
buttons, i get a True/False on the std out and the dialog box closes but the
parent window remains and seems to hang. This is on WinXP by the way. Is
this normal behaviour? How do I get the dialog box appearing without the
parent window or is this not possible?

Thanks,
Nathan.
 
H

Harlin Seritt

Nathan,
From what I've seen I'm afraid this is the way it is. If you call an
instance of tkMessageBox and you don't have a 'master' Tk instance
running, it will create its own.

Still, I'm sure with a bit of voodoo you can hide the self created tk
window while showing the message box. If you find a more elegant way to
accomplish this, please post back !

Harlin Seritt
 
G

garyr

Nathan said:
Hi,

I've been testing the standard dialog boxes in tkMessageBox under IDLE.
If I type for example, tkMessageBox.askyesno('test', 'test'), the dialog box
comes up fine but another window also appears. I'm guessing this is the
parent window of the message box. If I click on either of the yes/no
buttons, i get a True/False on the std out and the dialog box closes but the
parent window remains and seems to hang. This is on WinXP by the way. Is
this normal behaviour? How do I get the dialog box appearing without the
parent window or is this not possible?

Thanks,
Nathan.

See the post to this NG by Jeff Epler on Apr 12, Tkinter "withdraw"
and "askstring" problem

I think you can find the answer to your question there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top