Handle button click event in Python.
window = Tk()
window.title("Welcome to Coding Block")
window.geometry('350x200')
lable = Label(window, text="Hello World")
lable.grid(column=0, row=0)
def clicked():
lable.configure(text="Welcome to Coding Blocks")
button = Button(window, text="Clicked", command=clicked)
button.grid(column=1, row=0)
window.mainloop()
OUTPUT
No comments:
Post a Comment
Please do not any spam link in Comment Box