-1

Is there a way to change the text of the button when the button clicked?

edit: nvm I solved its like text

dripis
  • 43
  • 1
  • 7
  • 3
    Does this answer your question? [Python 3, Tkinter, How to update button text](https://stackoverflow.com/questions/32615440/python-3-tkinter-how-to-update-button-text) – Ayush Jul 10 '20 at 08:13
  • sorry but no. I cant understand that code. – dripis Jul 12 '20 at 02:25

1 Answers1

1

Does this help you to solve your issue. Using .config() you can update a button in tkinter

from tkinter import Button,Tk


root = Tk()


def click():
    b.config(text='You jus clicked me!')


b = Button(root, text='Click me', command=click)
b.pack()

root.mainloop()
Delrius Euphoria
  • 14,910
  • 3
  • 15
  • 46