(self, what, funcid=None)
| 1574 | self._unbind(('bind', self._w, sequence), funcid) |
| 1575 | |
| 1576 | def _unbind(self, what, funcid=None): |
| 1577 | if funcid is None: |
| 1578 | self.tk.call(*what, '') |
| 1579 | else: |
| 1580 | lines = self.tk.call(what).split('\n') |
| 1581 | prefix = f'if {{"[{funcid} ' |
| 1582 | keep = '\n'.join(line for line in lines |
| 1583 | if not line.startswith(prefix)) |
| 1584 | if not keep.strip(): |
| 1585 | keep = '' |
| 1586 | self.tk.call(*what, keep) |
| 1587 | self.deletecommand(funcid) |
| 1588 | |
| 1589 | def bind_all(self, sequence=None, func=None, add=None): |
| 1590 | """Bind to all widgets at an event SEQUENCE a call to function FUNC. |
no test coverage detected