Return the widget which has currently the focus in the application. Use focus_displayof to allow working with several displays. Return None if application does not have the focus.
(self)
| 813 | self.tk.call('focus', '-force', self._w) |
| 814 | |
| 815 | def focus_get(self): |
| 816 | """Return the widget which has currently the focus in the |
| 817 | application. |
| 818 | |
| 819 | Use focus_displayof to allow working with several |
| 820 | displays. Return None if application does not have |
| 821 | the focus.""" |
| 822 | name = self.tk.call('focus') |
| 823 | if name == 'none' or not name: return None |
| 824 | return self._nametowidget(name) |
| 825 | |
| 826 | def focus_displayof(self): |
| 827 | """Return the widget which has currently the focus on the |