python - Use 4 input boxes rather than 3 in tkinter? -
i working on computing level project. using tkinter create text input dialog box. can make work 3 labels need have 4, know if possible? , if how?
many thanks
edit: http://pastebin.com/7yx7ep51 link has code creating dialogue box. @ moment 4th ones commented out testing other parts
the problem closing parenthesis:
root = tk() label1 = label(root, text = "dive number") e1 = entry(root, bd = 5) label2 = label(root, text = "time in") e2 = entry(root, bd = 5) label3 = label(root, text = "time out") e3 = entry(root, bd = 5) label4 = label(root, text = ("max depth"))#--------------new-------------- e4 = entry(root, bd = 5) def getinfo(): print (e1.get()) print (e2.get()) print (e3.get()) print (e4.get()) submit = button(root, text = "submit", command = getinfo) label1.pack() e1.pack() label2.pack() e2.pack() label3.pack() e3.pack() label4.pack() e4.pack() submit.pack(side =bottom) root.mainloop()
Comments
Post a Comment