[Tutor] TKinter display dialog 2nd time?

alan.gauld@bt.com alan.gauld@bt.com
Thu Mar 20 18:38:07 2003


> The immediate problem is, I want to display a dialog, allow 
> the user to close it, then display it again. 

Sounds like you want to wrap it as a class inheriting from 
TopLevel (rather than Frame) and start the mainloop directly
from Tk()


>      self.Label.pack({"side": "top"})
>      self.QUIT.pack({"side": "top"})

The dictionary approach is depracated, its more normal to use
named parameters, like:

      self.Label.pack(side="top")
      self.QUIT.pack(side="top")

>    app.mainloop()

Use 
top = Tk()
top.mainloop() # start the Tkinter event loop running
dlog = app(top) # create the dialog object
dlog.pack()    # show it
dlog.unpack()  # hide it
dlog.pack()    # show it again

Or Something like that....

Alan G