grab_focus


Description:

public virtual bool grab_focus ()

Causes this to have the keyboard focus for the `GtkWindow` it's inside.

If this is not focusable, or its [[email protected]_focus] implementation cannot transfer the focus to a descendant of this that is focusable, it will not take focus and false will be returned.

Calling [[email protected]_focus] on an already focused widget is allowed, should not have an effect, and return true.

Parameters:

this

a `GtkWidget`

Returns:

true if focus is now inside this.




2022 vala-language.org