Sumanth, if you put your entry data into a StringVar or IntVar, it will be available for use elsewhere in the application.  You can combine this with the textvariable parameter, as discussed in example 8-5 in Grayson's book Python and Tkinter Programming. all his examples are available here: http://www.manning.com/grayson/ and the book is recommended.

here's his example 8-5:

from Tkinter import *

class Var(Frame):
    def __init__(self, master=None):
        Frame.__init__(self, master)
        self.pack()

        self.field = Entry()
        self.field.pack()

        self.value = StringVar()
        self.value.set("Jean-Paul Sartre")
        self.field["textvariable"] = self.value

        self.field.bind('<Key-Return>', self.print_value)

    def print_value(self, event):
        print 'Value is "%s"' % self.value.get ()
       
test = Var()
test.mainloop()


_______________________________________________
Tkinter-discuss mailing list
[email protected]
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to