Widget.setFocusable

Specifies whether widget can own the input focus.

Widget implementations should set focusable to true in their init() function if they want to receive keyboard input.

Note that having focusable be true is only one of the necessary conditions for being focusable. A widget must also be sensitive and can-focus and not have an ancestor that is marked as not can-focus in order to receive input focus.

See gtk.widget.Widget.grabFocus for actually setting the input focus on a widget.

class Widget
void
setFocusable
()

Parameters

focusable bool

whether or not widget can own the input focus