mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
fix widget bind if clause error
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user