Skip to content

Instantly share code, notes, and snippets.

@CodersArts
Created May 20, 2019 12:22
Show Gist options
  • Save CodersArts/5d91d173d209eb1069ee241f010139f6 to your computer and use it in GitHub Desktop.
Save CodersArts/5d91d173d209eb1069ee241f010139f6 to your computer and use it in GitHub Desktop.
from tkinter import *
window = Tk()
window.title("Welcome to codersarts app")
window.geometry('350x200')
lbl1 = Label(window, text=" ")
lbl1.grid(column=0, row=0)
lbl2 = Label(window, text="show result here")
lbl2.grid(column=1, row=5)
txt = Entry(window,width=10,)
txt.grid(column=1, row=0)
def clicked():
res = "Your name " + txt.get()+ " " +"is entered"
lbl2.configure(text= res)
btn = Button(window, text="Click Me", command=clicked)
btn.grid(column=2, row=0)
window.mainloop()
@CodersArts
Copy link
Author

Clicked command over a Button
for any issue or a problem regarding Tkinter, please contact at
Email: codersarts@gmail.com
Website: codersarts.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment