I don't have ads on this website.
Donations help keep this site going.

If you find tkinter-snippets.com useful, please donate any amount you feel comfortable with.
Visit https://ko-fi.com/jobinpy to donate. Thank you!

Tkinter - General – View all configure options of a widget

To view all the options that can be changed for a widget using .configure(), run the .keys() method to view the options of a widget.

my_button = ttk.Button(root)
print(my_button.keys())

>> ['command', 'default', 'takefocus', 'text', 'textvariable', 'underline', 'width', 'image', 'compound', 'padding', 'state', 'cursor', 'style', 'class']

This is useful for knowing which widget options can be changed during runtime when using the .configure() method.