Answers for "how to get the text of a button in tkinter"

2

how to find the text inside button in tkinter

my_text = my_button.cget('text')
Posted by: Guest on March-21-2020
1

add a button on tkinter

import tkinter
button1 = ttk.Button(self, text="anything", command=random command)
        button1.pack()
Posted by: Guest on March-23-2020

Code answers related to "how to get the text of a button in tkinter"

Python Answers by Framework

Browse Popular Code Answers by Language