fix widget bind if clause error

This commit is contained in:
Tom Schimansky
2022-12-06 19:25:00 +01:00
parent 5a17b1243e
commit 3d86b5a14f
12 changed files with 13 additions and 13 deletions

View File

@ -538,7 +538,7 @@ class CTkButton(CTkBaseClass):
def bind(self, sequence: str = None, command: Callable = None, add: Union[str, bool] = True):
""" called on the tkinter.Canvas """
if add != "+" or add is not True:
if not (add == "+" or add is True):
raise ValueError("'add' argument can only be '+' or True to preserve internal callbacks")
self._canvas.bind(sequence, command, add=True)
self._text_label.bind(sequence, command, add=True)