set_focusable


Description:

public void set_focusable (bool focusable)

Specifies whether this 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 grab_focus for actually setting the input focus on a widget.

Parameters:

this

a Widget

focusable

whether or not this can own the input focus