def focus ( self ) : self . _has_focus = True self . _frame . move_to ( self . _x , self . _y , self . _h ) if self . _on_focus is not None : self . _on_focus ( )
how to gain focus on a python widget
Call this to give this Widget the input focus .
def focus(self):
        """
        Call this to give this Widget the input focus.
        """
        self._has_focus = True
        self._frame.move_to(self._x, self._y, self._h)
        if self._on_focus is not None:
            self._on_focus()