Tuesday, August 4, 2020

Write a Program Handle button click event in Python.

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


Handle button click event Gui in Python.
Handle button click event in Python.

No comments:

Post a Comment

Please do not any spam link in Comment Box