CustomTkinter icon indicating copy to clipboard operation
CustomTkinter copied to clipboard

CTkLabel.configure(corner_radius) triggers exception

Open avalon60 opened this issue 3 years ago • 2 comments

CustomTkinter 4.6.3

Adding this third line, to simple_example.py, causes the exception:

label_1 = customtkinter.CTkLabel(master=frame_1, justify=tkinter.LEFT)
label_1.pack(pady=12, padx=10)
label_1.configure(corner_radius=25)

Here is the stack:

  File "/home/clive/PycharmProjects/customtk/simple_example.py", line 26, in <module>
    label_1.configure(corner_radius=25)
  File "/home/clive/PycharmProjects/customtk/venv/lib/python3.8/site-packages/customtkinter/widgets/ctk_label.py", line 148, in configure
    self.text_label.configure(**kwargs)  # pass remaining kwargs to label
  File "/usr/lib/python3.8/tkinter/__init__.py", line 1646, in configure
    return self._configure('configure', cnf, kw)
  File "/usr/lib/python3.8/tkinter/__init__.py", line 1636, in _configure
    self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
_tkinter.TclError: unknown option "-corner_radius"

avalon60 avatar Nov 03 '22 12:11 avalon60

@avalon60 Corner_radius in Label is not implemented in the configure options of Label.

For now use Label_1.corner_radius=0

Akascape avatar Nov 03 '22 14:11 Akascape

@avalon60 Corner_radius in Label is not implemented in the configure options of Label.

For now use Label_1.corner_radius=0

This is not a good option for me. My code is somewhat generic and I share the same code path for different widget types.

avalon60 avatar Nov 08 '22 11:11 avalon60

Fixed with version 5.0.0.

TomSchimansky avatar Dec 02 '22 12:12 TomSchimansky