GtkVBox

GtkVBox — A vertical container box

Functions

Types and Values

struct GtkVBox

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBox
                    ╰── GtkVBox

Implemented Interfaces

GtkVBox implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Includes

#include <gtk/gtk.h>

Description

A GtkVBox is a container that organizes child widgets into a single column.

Use the GtkBox packing interface to determine the arrangement, spacing, height, and alignment of GtkVBox children.

All children are allocated the same width.

GtkVBox has been deprecated. You can use GtkBox with a “orientation” set to GTK_ORIENTATION_VERTICAL instead when calling gtk_box_new(), which is a very quick and easy change.

If you have derived your own classes from GtkVBox, you can change the inheritance to derive directly from GtkBox, and set the “orientation” property to GTK_ORIENTATION_VERTICAL in your instance init function, with a call like:

gtk_orientable_set_orientation (GTK_ORIENTABLE (object),
                                GTK_ORIENTATION_VERTICAL);

If you have a grid-like layout composed of nested boxes, and you don’t need first-child or last-child styling, the recommendation is to switch to GtkGrid. For more information about migrating to GtkGrid, see Migrating from other containers to GtkGrid.

Functions

gtk_vbox_new ()

GtkWidget *
gtk_vbox_new (gboolean homogeneous,
              gint spacing);

gtk_vbox_new has been deprecated since version 3.2 and should not be used in newly-written code.

You can use gtk_box_new() with GTK_ORIENTATION_VERTICAL instead, which is a quick and easy change. But the recommendation is to switch to GtkGrid, since GtkBox is going to go away eventually. See Migrating from other containers to GtkGrid.

Creates a new GtkVBox.

Parameters

homogeneous

TRUE if all children are to be given equal space allotments.

spacing

the number of pixels to place by default between children.

Returns

a new GtkVBox.

Types and Values

struct GtkVBox

struct GtkVBox;

See Also

GtkHBox

© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk3/3.24/GtkVBox.html