Title: Signature.html
That change got the same result. Maybe this will make it all clearer.

root = Tk()
z=raw_input("howdy ")
dialog = DialogPrototype(root)
When the prompt appears, there is a small window showing on the screen, 2x2", I guess. It shows in the upper left a Tk icon on the title bar, and next to it in light gray tk, lower case. It persists when I press Cancel or OK.

My guess is that dialog needs to be "connected" to that root window. I tried with a frame, but that didn't do it.

That pretty much does it for me. I can live with it for my purposes if I stick to the command window, which nicely closes when I hit OK. IDLE forces a hang in the shell window, which requires effort to recover. The Tk window appears in using either command prompt or IDLE.

Alan Gauld wrote:

"Wayne Watson" <sierra_mtnv...@sbcglobal.net> wrote
Unfortunately, that takes me back to the original situation. That is, the blank window appears along with the dialog window.

OK Try this version:

# Derived from Grayson 5_14.py
from   Tkinter import *
from   tkSimpleDialog import Dialog

class DialogPrototype(Dialog):

   def body(self, master):
       self.title("Enter Site Data")

       Label(master, text='Latitude:').grid(row=0, sticky=W)
       self.lat=Entry(master, width=12)
       self.lat.grid(row=0, column=1)
              Label(master, text='Longitude:').grid(row=0, column=2)
       self.long=Entry(master, width=12)
       self.long.grid(row=0, column=3)
       self.master.withdraw()
              def apply(self):
       print "apply"
       print self.lat.get()
       print self.long.get()

print "setting"
lat=1.0
long=0.0

root = Tk()
DialogPrototype(root)

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


--
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)


                Life is one damn thing after another."
                     -- Mark Twain 
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to