[Tutor] TKinter display dialog 2nd time?

Bob Gailer bgailer@alum.rpi.edu
Thu Mar 20 19:38:04 2003


--=======58E34178=======
Content-Type: text/plain; x-avg-checked=avg-ok-5DDC6A43; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit

At 11:30 PM 3/20/2003 +0000, alan.gauld@bt.com wrote:

> > 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

I am sufficiently new to TKinter that I do not understand your proposal.

Bob Gailer
PLEASE NOTE NEW EMAIL ADDRESS bgailer@alum.rpi.edu
303 442 2625

--=======58E34178=======
Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-5DDC6A43
Content-Disposition: inline


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003

--=======58E34178=======--