MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / get_next_focus

Method get_next_focus

PySimpleGUI/PySimpleGUI.py:1553–1567  ·  view source on GitHub ↗

Gets the next element that should get focus after this element. :return: Element that will get focus after this one :rtype: (Element)

(self)

Source from the content-addressed store, hash-verified

1551 _error_popup_with_traceback("Exception blocking focus. Check your element's Widget", e)
1552
1553 def get_next_focus(self):
1554 """
1555 Gets the next element that should get focus after this element.
1556
1557 :return: Element that will get focus after this one
1558 :rtype: (Element)
1559 """
1560 if not self._widget_was_created(): # if widget hasn't been created yet, then don't allow
1561 return None
1562
1563 try:
1564 next_widget_focus = self.widget.tk_focusNext()
1565 return self.ParentForm.widget_to_element(next_widget_focus)
1566 except Exception as e:
1567 _error_popup_with_traceback("Exception getting next focus. Check your element's Widget", e)
1568
1569 def get_previous_focus(self):
1570 """

Callers 1

mainFunction · 0.80

Calls 3

_widget_was_createdMethod · 0.95
widget_to_elementMethod · 0.80

Tested by

no test coverage detected