Object
+--- Widget
+--- Container
+--- Box
Containers are widgets that contain other widgets.
The first type of container is a subclass of Bin, which is itself a child of Container. These Containers may only hold a single child, and are used to add functionality to it. Buttons and Frames are a good example of this type of Container.
The second type of Container can hold multiple widgets, and are used to manage their layout. Examples of this type of Container include Box and Tables.
Widgets are added or removed from a container using the following
functions:
$container->add( $widget );
$container->remove( $widget );
Once added to a container, the widget will not be visible until both the widget and the container calls the show() function, or until the container calls the show_all() function.
The following function will return a list of all the widgets in
the container:
@children = $container->children();
The border width is the number of pixels between the children
and the edge of the container. This can be set using one of the
following functions:
$container->border_width();
$container->set_border_width();
The first form is defined in GTK as a macro for the second, so
there is absolutely no difference between the two, though it is
probably best to use the second form. I do not know of any
get_border_width function.