Python Forum

Full Version: Error while changing button relief from raised to sunken on left click
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am trying to change the relief of a button from raised to sunken on left click. The button is created with a standard ttk.Button statement. In a custom theme, its relief has been modified to raised. It gets displayed perfectly. The code fragment for relief change is provided below.

button1.bind("<l>", lambda e: button1.configure(relief="sunken"))
Here is the error.
Error:
_tkinter.TclError: unknown option "-relief"
Version information: python 3.4.3, tkinter 8.6

I appreciate the cooperation of forum members.
You could perhaps check this example