setFocusable

open fun setFocusable(focusable: Boolean)

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.

Parameters

focusable

whether or not @widget can own the input focus