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

@@ -249,12 +249,12 @@ class CTkLabel(CTkBaseClass):
def bind(self, sequence: str = None, command: Callable = None, add: str = True):
""" called on the tkinter.Label and 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._label.bind(sequence, command, add=True)
def unbind(self, sequence: str, funcid: Optional[str] = None):
def unbind(self, sequence: str = None, funcid: Optional[str] = None):
""" called on the tkinter.Label and tkinter.Canvas """
if funcid is not None:
raise ValueError("'funcid' argument can only be None, because there is a bug in" +