(self, what, funcid=None)
| 1461 | self._unbind(('bind', self._w, sequence), funcid) |
| 1462 | |
| 1463 | def _unbind(self, what, funcid=None): |
| 1464 | if funcid is None: |
| 1465 | self.tk.call(*what, '') |
| 1466 | else: |
| 1467 | lines = self.tk.call(what).split('\n') |
| 1468 | prefix = f'if {{"[{funcid} ' |
| 1469 | keep = '\n'.join(line for line in lines |
| 1470 | if not line.startswith(prefix)) |
| 1471 | if not keep.strip(): |
| 1472 | keep = '' |
| 1473 | self.tk.call(*what, keep) |
| 1474 | self.deletecommand(funcid) |
| 1475 | |
| 1476 | def bind_all(self, sequence=None, func=None, add=None): |
| 1477 | """Bind to all widgets at an event SEQUENCE a call to function FUNC. |
no test coverage detected