Gtk.ButtonBox

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

Subclasses

Gtk.HButtonBox, Gtk.VButtonBox

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 (orientation)

get_child_non_homogeneous (child)

get_child_secondary (child)

get_layout ()

set_child_non_homogeneous (child, non_homogeneous)

set_child_secondary (child, is_secondary)

set_layout (layout_style)

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)

Name

Type

Flags

Short Description

layout-style

Gtk.ButtonBoxStyle

r/w/en

How to lay out the buttons in the box. Possible values are: spread, edge, start and end

Child Properties

Inherited

Gtk.Box (5)

Name

Type

Default

Flags

Short Description

non-homogeneous

bool

False

r/w

If True, the child will not be subject to homogeneous sizing

secondary

bool

False

r/w

If True, the child appears in a secondary group of children, suitable for, e.g., help buttons

Style Properties

Inherited

Gtk.Widget (17)

Name

Type

Default

Flags

Short Description

child-internal-pad-x

int

4

d/r

Amount to increase child’s size on either side deprecated

child-internal-pad-y

int

0

d/r

Amount to increase child’s size on the top and bottom deprecated

child-min-height

int

27

d/r

Minimum height of buttons inside the box deprecated

child-min-width

int

85

d/r

Minimum width of buttons inside the box deprecated

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.ButtonBox(*args, **kwargs)
Bases

Gtk.Box

Abstract

No

Structure

Gtk.ButtonBoxClass

classmethod new(orientation)[source]
Parameters

orientation (Gtk.Orientation) – the box’s orientation.

Returns

a new Gtk.ButtonBox.

Return type

Gtk.Widget

Creates a new Gtk.ButtonBox.

New in version 3.0.

get_child_non_homogeneous(child)[source]
Parameters

child (Gtk.Widget) – a child of self

Returns

True if the child is not subject to homogenous sizing

Return type

bool

Returns whether the child is exempted from homogenous sizing.

New in version 3.2.

get_child_secondary(child)[source]
Parameters

child (Gtk.Widget) – a child of self

Returns

whether child should appear in a secondary group of children.

Return type

bool

Returns whether child should appear in a secondary group of children.

New in version 2.4.

get_layout()[source]
Returns

the method used to lay out buttons in self.

Return type

Gtk.ButtonBoxStyle

Retrieves the method being used to arrange the buttons in a button box.

set_child_non_homogeneous(child, non_homogeneous)[source]
Parameters
  • child (Gtk.Widget) – a child of self

  • non_homogeneous (bool) – the new value

Sets whether the child is exempted from homogeous sizing.

New in version 3.2.

set_child_secondary(child, is_secondary)[source]
Parameters
  • child (Gtk.Widget) – a child of self

  • is_secondary (bool) – if True, the child appears in a secondary group of the button box.

Sets whether child should appear in a secondary group of children. A typical use of a secondary child is the help button in a dialog.

This group appears after the other children if the style is Gtk.ButtonBoxStyle.START, Gtk.ButtonBoxStyle.SPREAD or Gtk.ButtonBoxStyle.EDGE, and before the other children if the style is Gtk.ButtonBoxStyle.END. For horizontal button boxes, the definition of before/after depends on direction of the widget (see Gtk.Widget.set_direction()). If the style is Gtk.ButtonBoxStyle.START or Gtk.ButtonBoxStyle.END, then the secondary children are aligned at the other end of the button box from the main children. For the other styles, they appear immediately next to the main children.

set_layout(layout_style)[source]
Parameters

layout_style (Gtk.ButtonBoxStyle) – the new layout style

Changes the way buttons are arranged in their container.

Property Details

Gtk.ButtonBox.props.layout_style
Name

layout-style

Type

Gtk.ButtonBoxStyle

Default Value

Gtk.ButtonBoxStyle.EDGE

Flags

READABLE, WRITABLE, EXPLICIT_NOTIFY

How to lay out the buttons in the box. Possible values are: spread, edge, start and end