Gtk.HBox

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.HBox Gtk.HBox Gtk.Box->Gtk.HBox Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Box Gtk.Orientable->Gtk.Box Gtk.Widget->Gtk.Container

Subclasses:None

Child Properties

Inherited:Gtk.Box (5)

Style Properties

Inherited:Gtk.Widget (17)

Fields

Inherited:Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name Type Access Description
box Gtk.Box r  

Class Details

class Gtk.HBox(*args, **kwargs)
Bases:Gtk.Box
Abstract:No
Structure:Gtk.HBoxClass

Gtk.HBox is a container that organizes child widgets into a single row.

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

All children are allocated the same height.

Gtk.HBox has been deprecated. You can use Gtk.Box instead, which is a very quick and easy change. If you have derived your own classes from Gtk.HBox, you can simply change the inheritance to derive directly from Gtk.Box. No further changes are needed, since the default value of the Gtk.Orientable :orientation property is Gtk.Orientation.HORIZONTAL. If you don’t need first-child or last-child styling, and want your code to be future-proof, the recommendation is to switch to Gtk.Grid instead of nested boxes. 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.HBox.

Return type:

Gtk.Widget

Creates a new Gtk.HBox.

Deprecated since version 3.2: You can use Gtk.Box.new() with Gtk.Orientation.HORIZONTAL instead, which is a quick and easy change. But the recommendation is to switch to Gtk.Grid, since Gtk.Box is going to go away eventually. See Migrating from other containers to GtkGrid.