### Method

# Gtk Widgetset_parent

#### Declaration [src]

    void
    gtk_widget_set_parent (
      GtkWidget* widget,
      GtkWidget* parent
    )

#### Description [src]

Sets `parent` as the parent widget of `widget`.

This takes care of details such as updating the state and style of the child to reflect its new location and resizing the parent. The opposite function is `gtk_widget_unparent()`.

This function is useful only when implementing subclasses of `GtkWidget`.

Sets property | `Gtk.Widget:parent`

#### Parameters

`parent`

  Type: `GtkWidget`

  Parent widget.

  The data is owned by the caller of the method.