(self, what, funcid=None)
| 1556 | self._unbind(('bind', self._w, sequence), funcid) |
| 1557 | |
| 1558 | def _unbind(self, what, funcid=None): |
| 1559 | if funcid is None: |
| 1560 | self.tk.call(*what, '') |
| 1561 | else: |
| 1562 | lines = self.tk.call(what).split('\n') |
| 1563 | prefix = f'if {{"[{funcid} ' |
| 1564 | keep = '\n'.join(line for line in lines |
| 1565 | if not line.startswith(prefix)) |
| 1566 | if not keep.strip(): |
| 1567 | keep = '' |
| 1568 | self.tk.call(*what, keep) |
| 1569 | self.deletecommand(funcid) |
| 1570 | |
| 1571 | def bind_all(self, sequence=None, func=None, add=None): |
| 1572 | """Bind to all widgets at an event SEQUENCE a call to function FUNC. |
no test coverage detected