Reputation: 49
I have a problem to get this code work. I want it to print the input of the entry widget, but it doesn't work.
The shell gives me this message:
<bound method Entry.get of <tkinter.Entry object .55491440>>
The code is the following:
from tkinter import *
root = Tk ()
root.title("tab")
root.geometry("300x300")
def printer():
print (a.get)
num = IntVar()
a = Entry(root, textvariable = num)
b = Label(root, text = "day")
a.grid(row=0, column=1, sticky = W)
b.grid(row=0, column=0, sticky = W)
buttonGDO = Button (root, text="Enter", command = printer )
buttonGDO.grid(row=4)
Thank you
Upvotes: 0
Views: 105