Gtk.Widget.grab_focus
Description: Reference for Gtk.Widget.grab_focus

### Virtual Method

# Gtk Widgetgrab_focus

#### Declaration [src]

    gboolean
    grab_focus (
      GtkWidget* widget
    )

#### Description [src]

Causes `widget` to have the keyboard focus for the window that it belongs to.

If `widget` is not focusable, or its `Gtk.WidgetClass.grab_focus` implementation cannot transfer the focus to a descendant of `widget` that is focusable, it will not take focus and false will be returned.

Calling `gtk_widget_grab_focus()` on an already focused widget is allowed, should not have an effect, and return true.

#### Return value

Type: `gboolean`

True if focus is now inside `widget`.