Gtk.VBox

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Box Gtk.Box Gtk.VBox Gtk.VBox Gtk.Box->Gtk.VBox Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Box Gtk.Orientable->Gtk.Box Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gtk.Box (14), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new (homogeneous, spacing)

Virtual Methods

Inherited:

Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)

Child Properties

Inherited:

Gtk.Box (5)

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Fields

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

box

Gtk.Box

r

Class Details

class Gtk.VBox(*args, **kwargs)
Bases:

Gtk.Box

Abstract:

No

Structure:

Gtk.VBoxClass

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

Use the Gtk.Box packing interface to determine the arrangement, spacing, height, and alignment of Gtk.VBox children.

All children are allocated the same width.

Gtk.VBox has been deprecated. You can use Gtk.Box with a Gtk.Orientable :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 Gtk.VBox, you can change the inheritance to derive directly from Gtk.Box, and set the Gtk.Orientable :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 Gtk.Grid. For more information about migrating to Gtk.Grid, see Migrating from other containers to GtkGrid.

classmethod new(homogeneous, spacing)[source]
Parameters:
  • homogeneous (bool) – True if all children are to be given equal space allotments.

  • spacing (int) – the number of pixels to place by default between children.

Returns:

a new Gtk.VBox.

Return type:

Gtk.Widget

Creates a new Gtk.VBox.

Deprecated since version 3.2: You should use Gtk.Box.new() with a Gtk.Orientation.VERTICAL Gtk.Orientable :orientation instead