Dialogbox issues............................
Jørgen Cederberg
jorgencederberg at hotmail.com
Mon May 5 02:14:34 EDT 2003
Python-lover wrote:
> Dialogbox issues............................
> hi,
> I am using python1.5 and Tkinter. I want to
> display the dialog box when i click the button in my
> main window. I used tkSimpleDialogBox class. But the
> following program is not working as it is expected.
> How can i diaplay a dialog box in Tkinter? Let me
> know where i gone wrong.
>
>
> from Tkinter import *
> import tkMessageBox
> import tkSimpleDialog
> import string
>
> class App:
> def __init__(self,parent):
> self.myparent = parent
> Button(self.myparent,text="Click",width=10,
> height=10,command=self.showdlg).pack()
>
> def showdlg(self):
> MyDialog(self)
This should be changed to: MyDialog(self.myparent)
self.myparent is a Tk() object that should be passed to the Dialog class.
Regards
Jorgen Cederberg
More information about the Python-list
mailing list