Created
May 20, 2019 12:22
-
-
Save CodersArts/5d91d173d209eb1069ee241f010139f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clicked command over a Button
for any issue or a problem regarding Tkinter, please contact at
Email: codersarts@gmail.com
Website: codersarts.com