Method
GtkContaineradd
Declaration [src]
void
gtk_container_add (
GtkContainer* container,
GtkWidget* widget
)
Description [src]
Adds widget
to container
. Typically used for simple containers
such as GtkWindow
, GtkFrame
, or GtkButton
; for more complicated
layout containers such as GtkBox
or GtkGrid
, this function will
pick default packing parameters that may not be correct. So
consider functions such as gtk_box_pack_start()
and
gtk_grid_attach()
as an alternative to gtk_container_add()
in
those cases. A widget may be added to only one container at a time;
you can’t place the same widget inside two different containers.
Note that some containers, such as GtkScrolledWindow
or GtkListBox
,
may add intermediate children between the added widget and the container.
Parameters
widget
-
Type:
GtkWidget
A widget to be placed inside
container
.The data is owned by the caller of the method.