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 [method@Gtk.Widget.grab_focus] 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

Meta