Jan-30-2019, 08:28 PM
from tkinter import * import Pmw root = Tk() root.title('EntryField') var = StringVar() for i in ['First Name:','Surname','Sex:','Age:','Phone Number:','Email Address:']: entryfield = Pmw.EntryField(root,labelpos=W,label_text=i,label_width=15,entry_width=24,entry_textvariable=var) entryfield.pack(side=TOP,padx=5,pady=5) button = Button(root,text='Register',command=lambda: print(var.get())) button.pack(side=LEFT,pady=5,padx=5,expand=YES,fill=X) button = Button(root,text='Cancel',command=lambda:entryfield.delete(END,var.get())) button.pack(side=LEFT,padx=5,expand=YES,fill=X)Hi, please how can I click on the 'Register' button and get all the information inputed into each entryfield.
Also, how can I delete each and every inputed information in the entryfield by clicking on the 'Cancel' button?
And again, please why am I tryping in one entryfield and getting it duplicated on the others. Is there how I can stop it?
Thanks.