Returns the element that matches a supplied tkinter widget. If no matching element is found, then None is returned. :return: Element that uses the specified widget :rtype: Element | None
(self, widget)
| 11020 | return element |
| 11021 | |
| 11022 | def widget_to_element(self, widget): |
| 11023 | """ |
| 11024 | Returns the element that matches a supplied tkinter widget. |
| 11025 | If no matching element is found, then None is returned. |
| 11026 | |
| 11027 | |
| 11028 | :return: Element that uses the specified widget |
| 11029 | :rtype: Element | None |
| 11030 | """ |
| 11031 | if self.AllKeysDict is None or len(self.AllKeysDict) == 0: |
| 11032 | return None |
| 11033 | for key, element in self.AllKeysDict.items(): |
| 11034 | if element.Widget == widget: |
| 11035 | return element |
| 11036 | return None |
| 11037 | |
| 11038 | def _BuildKeyDict(self): |
| 11039 | """ |
no outgoing calls
no test coverage detected