I am having problems with tkinter showing .entry rather than text

Issue

This Content is from Stack Overflow. Question asked by HeetsMcGeets

from tkinter import *

def click():
    UsersName=name.get
    nameList.insert(END,name)
   
    


window=Tk()




window.title("Name List")




window.geometry("400x400")




window.configure(bg="light grey")




label1=Label(text="Enter a name:")




label1.place(x=50,y=70)




button1=Button(text="Add to list",width=10, command=click)




button1.place(x=290,y=70)




nameList=Listbox()




nameList.place(x=150,y=100,width=120,height=150)




name=Entry(text="")




name.place(x=150,y=70,width=120,height=20)




window.mainloop()



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?