Back to Seed Clases







Class Gtk.Box

Import line: Gtk =;
GIR File: Gtk-3.0.gir
C documentation: GtkBox
Class : Box
Implements: Atk.ImplementorIface, Gtk.Buildable, Gtk.Orientable
Subclasses: GnomeBluetooth.Chooser, GnomeBluetooth.ChooserCombo, GnomeBluetooth.FilterWidget, Gtk.AppChooserWidget, Gtk.VBox
Extends: Gtk.Container
GtkBox is an widget which encapsulates functionality for a
particular kind of container, one that organizes a variable number of
widgets into a rectangular area. GtkBox has a number of derived
classes, e.g. GtkHBox and GtkVBox.
The rectangular area of a GtkBox is organized into either a single row
or a single column of child widgets depending upon whether the box is
of type GtkHBox or GtkVBox, respectively. Thus, all children of a
GtkBox are allocated one dimension in common, which is the height of a
row, or the width of a column.
GtkBox uses a notion of packing. Packing
refers to adding widgets with reference to a particular position in a
GtkContainer. For a GtkBox, there are two reference positions: the
start and the end of the box.
For a GtkVBox, the start is defined as the top of the box and the end is
defined as the bottom. For a GtkHBox the start is defined as the
left side and the end is defined as the right side.
Use repeated calls to gtk_box_pack_start() to pack widgets into a
GtkBox from start to end. Use gtk_box_pack_end() to add widgets from
end to start. You may intersperse these calls and add widgets from
both ends of the same GtkBox.
Because GtkBox is a GtkContainer, you may also use
gtk_container_add() to insert widgets into the box, and they will be
packed with the default values for GtkBox:expand and GtkBox:fill.
Use gtk_container_remove() to remove widgets from the GtkBox.
Use gtk_box_set_homogeneous() to specify whether or not all children
of the GtkBox are forced to get the same amount of space.
Use gtk_box_set_spacing() to determine how much space will be
minimally placed between all children in the GtkBox. Note that
spacing is added between the children, while
padding added by gtk_box_pack_start() or gtk_box_pack_end() is added
on either side of the widget it belongs to.
Use gtk_box_reorder_child() to move a GtkBox child to a different
place in the box.
Use gtk_box_set_child_packing() to reset the GtkBox:expand,
GtkBox:fill and GtkBox:padding child properties.
Use gtk_box_query_child_packing() to query these fields.

Note that a single-row or single-column GtkGrid provides exactly the
same functionality as GtkBox.

Properties Defined By
Methods / Constructors
Method / Constructor Defined By
Events - usage syntax: this.signals.EVENTNAME.connect( Function )
Event Defined By
Used by These Methods / Signals / Properties- Nowhere other than here
Documentation generated by Introspection Doc Generator Loosely Based on JsDoc Toolkit on Sat Apr 16 2011 17:12:07 GMT+0800 (HKT)