Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to add strings with entry in tkinter

from tkinter import *
root=Tk()
name_info=Entry(root,width=30)
name_info.grid(row=0,column=0)
name="My name is "
def show_sentence():
    name_label = Label(root , text=name + str(name_info.get())).grid(row=2 , column=0)
showname_btn=Button(root,text="submit",command=show_sentence).grid(row=1,column=0)
root.mainloop()
 
PREVIOUS NEXT
Tagged: #add #strings #entry #tkinter
ADD COMMENT
Topic
Name
6+9 =