[Tutor] Help Entry !!!

Cesar Garcia cdgarciaq at yahoo.com
Tue Apr 18 20:14:03 CEST 2006


Hi !!!
  Friends, i nedd process Data Entry in python
  Example
   
  Entry = 20
  Result = 20*10
   
  This Result in Windows (Tkinter)
  How do you do Think !!!!!!!
   
  Regards
  Cesar
  Exmaple
  from Tkinter import *
  class MyDialog:
      def __init__(self, parent):
        top = self.top = Toplevel(parent)
        Label(top, text="Valor").pack()
        self.e = Entry(top)
        self.e.pack(padx=5)
        b = Button(top, text="OK", command=self.ok)
        b.pack(pady=5)
      def ok(self):
        print "value is", self.e.get()
        self.top.destroy()
  root = Tk()
root.update()
d = MyDialog(root)
root.wait_window(d.top)

		
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060418/0bb19d34/attachment.htm 


More information about the Tutor mailing list