Gtk.Container

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 GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Widget->Gtk.Container

Subclasses:

Gtk.Bin, Gtk.Box, Gtk.Button, Gtk.ComboBox, Gtk.Dialog, Gtk.Fixed, Gtk.FlowBox, Gtk.Grid, Gtk.HeaderBar, Gtk.IconView, Gtk.Layout, Gtk.ListBox, Gtk.MenuShell, Gtk.Notebook, Gtk.Paned, Gtk.Socket, Gtk.Stack, Gtk.Table, Gtk.TextView, Gtk.ToolItemGroup, Gtk.ToolPalette, Gtk.Toolbar, Gtk.TreeView

Methods

Inherited:

Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)

Structs:

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

class

find_child_property (property_name)

class

handle_border_width ()

class

install_child_properties (pspecs)

class

install_child_property (property_id, pspec)

class

list_child_properties ()

add (widget)

check_resize ()

child_get (child, *prop_names)

child_get_property (child, property_name, value=None)

child_notify (child, child_property)

child_notify_by_pspec (child, pspec)

child_set (child, **kwargs)

child_set_property (child, property_name, value)

child_type ()

forall (callback, *callback_data)

foreach (callback, *callback_data)

get_border_width ()

get_children ()

get_focus_chain ()

get_focus_child ()

get_focus_hadjustment ()

get_focus_vadjustment ()

get_path_for_child (child)

get_resize_mode ()

propagate_draw (child, cr)

remove (widget)

resize_children ()

set_border_width (border_width)

set_focus_chain (focusable_widgets)

set_focus_child (child)

set_focus_hadjustment (adjustment)

set_focus_vadjustment (adjustment)

set_reallocate_redraws (needs_redraws)

set_resize_mode (resize_mode)

unset_focus_chain ()

Virtual Methods

Inherited:

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

do_add (widget)

do_check_resize ()

do_child_type ()

do_composite_name (child)

do_forall (include_internals, callback, callback_data)

do_get_child_property (child, property_id, value, pspec)

do_get_path_for_child (child)

do_remove (widget)

do_set_child_property (child, property_id, value, pspec)

do_set_focus_child (child)

Properties

Inherited:

Gtk.Widget (39)

Name

Type

Flags

Short Description

border-width

int

r/w/en

The width of the empty border outside the containers children

child

Gtk.Widget

d/w

Can be used to add a new child to the container deprecated

resize-mode

Gtk.ResizeMode

d/r/w/en

Specify how resize events are handled deprecated

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

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

Name

Short Description

add

check-resize

remove

set-focus-child

Fields

Inherited:

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

Name

Type

Access

Description

widget

Gtk.Widget

r

Class Details

class Gtk.Container(**kwargs)
Bases:

Gtk.Widget

Abstract:

Yes

Structure:

Gtk.ContainerClass

A GTK+ user interface is constructed by nesting widgets inside widgets. Container widgets are the inner nodes in the resulting tree of widgets: they contain other widgets. So, for example, you might have a Gtk.Window containing a Gtk.Frame containing a Gtk.Label. If you wanted an image instead of a textual label inside the frame, you might replace the Gtk.Label widget with a Gtk.Image widget.

There are two major kinds of container widgets in GTK+. Both are subclasses of the abstract Gtk.Container base class.

The first type of container widget has a single child widget and derives from Gtk.Bin. These containers are decorators, which add some kind of functionality to the child. For example, a Gtk.Button makes its child into a clickable button; a Gtk.Frame draws a frame around its child and a Gtk.Window places its child widget inside a top-level window.

The second type of container can have more than one child; its purpose is to manage layout. This means that these containers assign sizes and positions to their children. For example, a Gtk.HBox arranges its children in a horizontal row, and a Gtk.Grid arranges the widgets it contains in a two-dimensional grid.

For implementations of Gtk.Container the virtual method Gtk.Container.do_forall() is always required, since it’s used for drawing and other internal operations on the children. If the Gtk.Container implementation expect to have non internal children it’s needed to implement both Gtk.Container.do_add() and Gtk.Container.do_remove(). If the Gtk.Container implementation has internal children, they should be added with Gtk.Widget.set_parent() on init() and removed with Gtk.Widget.unparent() in the Gtk.Widget.do_destroy() implementation. See more about implementing custom widgets at https://wiki.gnome.org/HowDoI/CustomWidgets

Height for width geometry management

GTK+ uses a height-for-width (and width-for-height) geometry management system. Height-for-width means that a widget can change how much vertical space it needs, depending on the amount of horizontal space that it is given (and similar for width-for-height).

There are some things to keep in mind when implementing container widgets that make use of GTK+’s height for width geometry management system. First, it’s important to note that a container must prioritize one of its dimensions, that is to say that a widget or container can only have a Gtk.SizeRequestMode that is Gtk.SizeRequestMode.HEIGHT_FOR_WIDTH or Gtk.SizeRequestMode.WIDTH_FOR_HEIGHT. However, every widget and container must be able to respond to the APIs for both dimensions, i.e. even if a widget has a request mode that is height-for-width, it is possible that its parent will request its sizes using the width-for-height APIs.

To ensure that everything works properly, here are some guidelines to follow when implementing height-for-width (or width-for-height) containers.

Each request mode involves 2 virtual methods. Height-for-width apis run through Gtk.Widget.get_preferred_width() and then through Gtk.Widget.get_preferred_height_for_width(). When handling requests in the opposite Gtk.SizeRequestMode it is important that every widget request at least enough space to display all of its content at all times.

When Gtk.Widget.get_preferred_height() is called on a container that is height-for-width, the container must return the height for its minimum width. This is easily achieved by simply calling the reverse apis implemented for itself as follows:

static void
foo_container_get_preferred_height (GtkWidget *widget,
                                    gint *min_height,
                                    gint *nat_height)
{
   if (i_am_in_height_for_width_mode)
     {
       gint min_width;

       GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget,
                                                           &min_width,
                                                           NULL);
       GTK_WIDGET_GET_CLASS (widget)->get_preferred_height_for_width
                                                          (widget,
                                                           min_width,
                                                           min_height,
                                                           nat_height);
     }
   else
     {
       ... many containers support both request modes, execute the
       real width-for-height request here by returning the
       collective heights of all widgets that are stacked
       vertically (or whatever is appropriate for this container)
       ...
     }
}

Similarly, when Gtk.Widget.get_preferred_width_for_height() is called for a container or widget that is height-for-width, it then only needs to return the base minimum width like so:

static void
foo_container_get_preferred_width_for_height (GtkWidget *widget,
                                              gint for_height,
                                              gint *min_width,
                                              gint *nat_width)
{
   if (i_am_in_height_for_width_mode)
     {
       GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget,
                                                           min_width,
                                                           nat_width);
     }
   else
     {
       ... execute the real width-for-height request here based on
       the required width of the children collectively if the
       container were to be allocated the said height ...
     }
}

Height for width requests are generally implemented in terms of a virtual allocation of widgets in the input orientation. Assuming an height-for-width request mode, a container would implement the get_preferred_height_for_width() virtual function by first calling Gtk.Widget.get_preferred_width() for each of its children.

For each potential group of children that are lined up horizontally, the values returned by Gtk.Widget.get_preferred_width() should be collected in an array of Gtk.RequestedSize structures. Any child spacing should be removed from the input for_width and then the collective size should be allocated using the Gtk.distribute_natural_allocation() convenience function.

The container will then move on to request the preferred height for each child by using Gtk.Widget.get_preferred_height_for_width() and using the sizes stored in the Gtk.RequestedSize array.

To allocate a height-for-width container, it’s again important to consider that a container must prioritize one dimension over the other. So if a container is a height-for-width container it must first allocate all widgets horizontally using a Gtk.RequestedSize array and Gtk.distribute_natural_allocation() and then add any extra space (if and where appropriate) for the widget to expand.

After adding all the expand space, the container assumes it was allocated sufficient height to fit all of its content. At this time, the container must use the total horizontal sizes of each widget to request the height-for-width of each of its children and store the requests in a Gtk.RequestedSize array for any widgets that stack vertically (for tabular containers this can be generalized into the heights and widths of rows and columns). The vertical space must then again be distributed using Gtk.distribute_natural_allocation() while this time considering the allocated height of the widget minus any vertical spacing that the container adds. Then vertical expand space should be added where appropriate and available and the container should go on to actually allocating the child widgets.

See GtkWidget’s geometry management section to learn more about implementing height-for-width geometry management for widgets.

Child properties

Gtk.Container introduces child properties. These are object properties that are not specific to either the container or the contained widget, but rather to their relation. Typical examples of child properties are the position or pack-type of a widget which is contained in a Gtk.Box.

Use Gtk.ContainerClass.install_child_property() to install child properties for a container class and Gtk.ContainerClass.find_child_property() or Gtk.ContainerClass.list_child_properties() to get information about existing child properties.

To set the value of a child property, use Gtk.Container.child_set_property(), Gtk.Container.child_set() or gtk_container_child_set_valist(). To obtain the value of a child property, use Gtk.Container.child_get_property(), Gtk.Container.child_get() or gtk_container_child_get_valist(). To emit notification about child property changes, use Gtk.Widget.child_notify().

Gtk.Container as Gtk.Buildable

The Gtk.Container implementation of the Gtk.Buildable interface supports a <packing> element for children, which can contain multiple <property> elements that specify child properties for the child.

Since 2.16, child properties can also be marked as translatable using the same “translatable”, “comments” and “context” attributes that are used for regular properties.

Since 3.16, containers can have a <focus-chain> element containing multiple <widget> elements, one for each child that should be added to the focus chain. The ”name” attribute gives the id of the widget.

An example of these properties in UI definitions:

<object class="GtkBox">
  <child>
    <object class="GtkEntry" id="entry1"/>
    <packing>
      <property name="pack-type">start</property>
    </packing>
  </child>
  <child>
    <object class="GtkEntry" id="entry2"/>
  </child>
  <focus-chain>
    <widget name="entry1"/>
    <widget name="entry2"/>
  </focus-chain>
</object>
classmethod find_child_property(property_name)
Parameters:

property_name (str) – the name of the child property to find

Returns:

the GObject.ParamSpec of the child property or None if class has no child property with that name.

Return type:

GObject.ParamSpec or None

Finds a child property of a container class by name.

classmethod handle_border_width()

Modifies a subclass of Gtk.ContainerClass to automatically add and remove the border-width setting on Gtk.Container. This allows the subclass to ignore the border width in its size request and allocate methods. The intent is for a subclass to invoke this in its class_init function.

Gtk.ContainerClass.handle_border_width() is necessary because it would break API too badly to make this behavior the default. So subclasses must “opt in” to the parent class handling border_width for them.

classmethod install_child_properties(pspecs)
Parameters:

pspecs ([GObject.ParamSpec]) – the GObject.ParamSpec array defining the new child properties

Installs child properties on a container class.

New in version 3.18.

classmethod install_child_property(property_id, pspec)
Parameters:

Installs a child property on a container class.

classmethod list_child_properties()
Returns:

a newly allocated None-terminated array of GObject.ParamSpec. The array must be freed with GLib.free().

Return type:

[GObject.ParamSpec]

Returns all child properties of a container class.

add(widget)[source]
Parameters:

widget (Gtk.Widget) – a widget to be placed inside self

Adds widget to self. Typically used for simple containers such as Gtk.Window, Gtk.Frame, or Gtk.Button; for more complicated layout containers such as Gtk.Box or Gtk.Grid, this function will pick default packing parameters that may not be correct. So consider functions such as Gtk.Box.pack_start() and Gtk.Grid.attach() as an alternative to Gtk.Container.add() in those cases. A widget may be added to only one container at a time; you can’t place the same widget inside two different containers.

Note that some containers, such as Gtk.ScrolledWindow or Gtk.ListBox, may add intermediate children between the added widget and the container.

check_resize()[source]
child_get(child, *prop_names)[source]

Returns a list of child property values for the given names.

child_get_property(child, property_name, value=None)[source]
Parameters:
Returns:

The Python value of the child property

Gets the value of a child property for child and self.

child_notify(child, child_property)[source]
Parameters:
  • child (Gtk.Widget) – the child widget

  • child_property (str) – the name of a child property installed on the class of self

Emits a Gtk.Widget ::child-notify signal for the ‘child property [child-properties]’ child_property on the child.

This is an analogue of GObject.Object.notify() for child properties.

Also see Gtk.Widget.child_notify().

New in version 3.2.

child_notify_by_pspec(child, pspec)[source]
Parameters:

Emits a Gtk.Widget ::child-notify signal for the ‘child property [child-properties]’ specified by pspec on the child.

This is an analogue of GObject.Object.notify_by_pspec() for child properties.

New in version 3.18.

child_set(child, **kwargs)[source]

Set a child properties on the given child to key/value pairs.

child_set_property(child, property_name, value)[source]
Parameters:
  • child (Gtk.Widget) – a widget which is a child of self

  • property_name (str) – the name of the property to set

  • value (GObject.Value) – the value to set the property to

Sets a child property for child and self.

child_type()[source]
Returns:

a GObject.GType.

Return type:

GObject.GType

Returns the type of the children supported by the container.

Note that this may return GObject.TYPE_NONE to indicate that no more children can be added, e.g. for a Gtk.Paned which already has two children.

forall(callback, *callback_data)[source]
Parameters:

Invokes callback on each direct child of self, including children that are considered “internal” (implementation details of the container). “Internal” children generally weren’t added by the user of the container, but were added by the container implementation itself.

Most applications should use Gtk.Container.foreach(), rather than Gtk.Container.forall().

foreach(callback, *callback_data)[source]
Parameters:

Invokes callback on each non-internal child of self. See Gtk.Container.forall() for details on what constitutes an “internal” child. For all practical purposes, this function should iterate over precisely those child widgets that were added to the container by the application with explicit add() calls.

It is permissible to remove the child from the callback handler.

Most applications should use Gtk.Container.foreach(), rather than Gtk.Container.forall().

get_border_width()[source]
Returns:

the current border width

Return type:

int

Retrieves the border width of the container. See Gtk.Container.set_border_width().

get_children()[source]
Returns:

a newly-allocated list of the container’s non-internal children.

Return type:

[Gtk.Widget]

Returns the container’s non-internal children. See Gtk.Container.forall() for details on what constitutes an “internal” child.

get_focus_chain()[source]
Returns:

A list of focusable widgets or None if no focus chain has been explicitly set.

Return type:

[Gtk.Widget] or None

Retrieves the focus chain of the container, if one has been set explicitly. If no focus chain has been explicitly set, GTK+ computes the focus chain based on the positions of the children. In that case returns None.

Deprecated since version 3.24: For overriding focus behavior, use the GtkWidgetClass::focus signal.

get_focus_child()[source]
Returns:

The child widget which will receive the focus inside self when the self is focused, or None if none is set.

Return type:

Gtk.Widget or None

Returns the current focus child widget inside self. This is not the currently focused widget. That can be obtained by calling Gtk.Window.get_focus().

New in version 2.14.

get_focus_hadjustment()[source]
Returns:

the horizontal focus adjustment, or None if none has been set.

Return type:

Gtk.Adjustment or None

Retrieves the horizontal focus adjustment for the container. See Gtk.Container.set_focus_hadjustment ().

get_focus_vadjustment()[source]
Returns:

the vertical focus adjustment, or None if none has been set.

Return type:

Gtk.Adjustment or None

Retrieves the vertical focus adjustment for the container. See Gtk.Container.set_focus_vadjustment().

get_path_for_child(child)[source]
Parameters:

child (Gtk.Widget) – a child of self

Returns:

A newly created Gtk.WidgetPath

Return type:

Gtk.WidgetPath

Returns a newly created widget path representing all the widget hierarchy from the toplevel down to and including child.

get_resize_mode()[source]
Returns:

the current resize mode

Return type:

Gtk.ResizeMode

Returns the resize mode for the container. See Gtk.Container.set_resize_mode ().

Deprecated since version 3.12: Resize modes are deprecated. They aren’t necessary anymore since frame clocks and might introduce obscure bugs if used.

propagate_draw(child, cr)[source]
Parameters:

When a container receives a call to the draw function, it must send synthetic Gtk.Widget ::draw calls to all children that don’t have their own Gdk.Windows. This function provides a convenient way of doing this. A container, when it receives a call to its Gtk.Widget ::draw function, calls Gtk.Container.propagate_draw() once for each child, passing in the cr the container received.

Gtk.Container.propagate_draw() takes care of translating the origin of cr, and deciding whether the draw needs to be sent to the child. It is a convenient and optimized way of getting the same effect as calling Gtk.Widget.draw() on the child directly.

In most cases, a container can simply either inherit the Gtk.Widget ::draw implementation from Gtk.Container, or do some drawing and then chain to the ::draw implementation from Gtk.Container.

remove(widget)[source]
Parameters:

widget (Gtk.Widget) – a current child of self

Removes widget from self. widget must be inside self. Note that self will own a reference to widget, and that this may be the last reference held; so removing a widget from its container can destroy that widget. If you want to use widget again, you need to add a reference to it before removing it from a container, using GObject.Object.ref(). If you don’t want to use widget again it’s usually more efficient to simply destroy it directly using Gtk.Widget.destroy() since this will remove it from the container and help break any circular reference count cycles.

resize_children()[source]

Deprecated since version 3.10.

set_border_width(border_width)[source]
Parameters:

border_width (int) – amount of blank space to leave outside the container. Valid values are in the range 0-65535 pixels.

Sets the border width of the container.

The border width of a container is the amount of space to leave around the outside of the container. The only exception to this is Gtk.Window; because toplevel windows can’t leave space outside, they leave the space inside. The border is added on all sides of the container. To add space to only one side, use a specific Gtk.Widget :margin property on the child widget, for example Gtk.Widget :margin-top.

set_focus_chain(focusable_widgets)[source]
Parameters:

focusable_widgets ([Gtk.Widget]) – the new focus chain

Sets a focus chain, overriding the one computed automatically by GTK+.

In principle each widget in the chain should be a descendant of the container, but this is not enforced by this method, since it’s allowed to set the focus chain before you pack the widgets, or have a widget in the chain that isn’t always packed. The necessary checks are done when the focus chain is actually traversed.

Deprecated since version 3.24: For overriding focus behavior, use the GtkWidgetClass::focus signal.

set_focus_child(child)[source]
Parameters:

child (Gtk.Widget or None) – a Gtk.Widget, or None

Sets, or unsets if child is None, the focused child of self.

This function emits the GtkContainer::set_focus_child signal of self. Implementations of Gtk.Container can override the default behaviour by overriding the class closure of this signal.

This is function is mostly meant to be used by widgets. Applications can use Gtk.Widget.grab_focus() to manually set the focus to a specific widget.

set_focus_hadjustment(adjustment)[source]
Parameters:

adjustment (Gtk.Adjustment) – an adjustment which should be adjusted when the focus is moved among the descendents of self

Hooks up an adjustment to focus handling in a container, so when a child of the container is focused, the adjustment is scrolled to show that widget. This function sets the horizontal alignment. See Gtk.ScrolledWindow.get_hadjustment() for a typical way of obtaining the adjustment and Gtk.Container.set_focus_vadjustment() for setting the vertical adjustment.

The adjustments have to be in pixel units and in the same coordinate system as the allocation for immediate children of the container.

set_focus_vadjustment(adjustment)[source]
Parameters:

adjustment (Gtk.Adjustment) – an adjustment which should be adjusted when the focus is moved among the descendents of self

Hooks up an adjustment to focus handling in a container, so when a child of the container is focused, the adjustment is scrolled to show that widget. This function sets the vertical alignment. See Gtk.ScrolledWindow.get_vadjustment() for a typical way of obtaining the adjustment and Gtk.Container.set_focus_hadjustment() for setting the horizontal adjustment.

The adjustments have to be in pixel units and in the same coordinate system as the allocation for immediate children of the container.

set_reallocate_redraws(needs_redraws)[source]
Parameters:

needs_redraws (bool) – the new value for the container’s reallocate_redraws flag

Sets the reallocate_redraws flag of the container to the given value.

Containers requesting reallocation redraws get automatically redrawn if any of their children changed allocation.

Deprecated since version 3.14: Call Gtk.Widget.queue_draw() in your size_allocate handler.

set_resize_mode(resize_mode)[source]
Parameters:

resize_mode (Gtk.ResizeMode) – the new resize mode

Sets the resize mode for the container.

The resize mode of a container determines whether a resize request will be passed to the container’s parent, queued for later execution or executed immediately.

Deprecated since version 3.12: Resize modes are deprecated. They aren’t necessary anymore since frame clocks and might introduce obscure bugs if used.

unset_focus_chain()[source]

Removes a focus chain explicitly set with Gtk.Container.set_focus_chain().

Deprecated since version 3.24: For overriding focus behavior, use the GtkWidgetClass::focus signal.

do_add(widget) virtual
Parameters:

widget (Gtk.Widget) – a widget to be placed inside container

Adds widget to container. Typically used for simple containers such as Gtk.Window, Gtk.Frame, or Gtk.Button; for more complicated layout containers such as Gtk.Box or Gtk.Grid, this function will pick default packing parameters that may not be correct. So consider functions such as Gtk.Box.pack_start() and Gtk.Grid.attach() as an alternative to Gtk.Container.add() in those cases. A widget may be added to only one container at a time; you can’t place the same widget inside two different containers.

Note that some containers, such as Gtk.ScrolledWindow or Gtk.ListBox, may add intermediate children between the added widget and the container.

do_check_resize() virtual
do_child_type() virtual
Returns:

a GObject.GType.

Return type:

GObject.GType

Returns the type of the children supported by the container.

Note that this may return GObject.TYPE_NONE to indicate that no more children can be added, e.g. for a Gtk.Paned which already has two children.

do_composite_name(child) virtual
Parameters:

child (Gtk.Widget) –

Return type:

str

do_forall(include_internals, callback, callback_data) virtual
Parameters:

Invokes callback on each direct child of container, including children that are considered “internal” (implementation details of the container). “Internal” children generally weren’t added by the user of the container, but were added by the container implementation itself.

Most applications should use Gtk.Container.foreach(), rather than Gtk.Container.forall().

do_get_child_property(child, property_id, value, pspec) virtual
Parameters:
do_get_path_for_child(child) virtual
Parameters:

child (Gtk.Widget) – a child of container

Returns:

A newly created Gtk.WidgetPath

Return type:

Gtk.WidgetPath

Returns a newly created widget path representing all the widget hierarchy from the toplevel down to and including child.

do_remove(widget) virtual
Parameters:

widget (Gtk.Widget) – a current child of container

Removes widget from container. widget must be inside container. Note that container will own a reference to widget, and that this may be the last reference held; so removing a widget from its container can destroy that widget. If you want to use widget again, you need to add a reference to it before removing it from a container, using GObject.Object.ref(). If you don’t want to use widget again it’s usually more efficient to simply destroy it directly using Gtk.Widget.destroy() since this will remove it from the container and help break any circular reference count cycles.

do_set_child_property(child, property_id, value, pspec) virtual
Parameters:
do_set_focus_child(child) virtual
Parameters:

child (Gtk.Widget or None) – a Gtk.Widget, or None

Sets, or unsets if child is None, the focused child of container.

This function emits the GtkContainer::set_focus_child signal of container. Implementations of Gtk.Container can override the default behaviour by overriding the class closure of this signal.

This is function is mostly meant to be used by widgets. Applications can use Gtk.Widget.grab_focus() to manually set the focus to a specific widget.

Signal Details

Gtk.Container.signals.add(container, object)
Signal Name:

add

Flags:

RUN_FIRST

Parameters:
Gtk.Container.signals.check_resize(container)
Signal Name:

check-resize

Flags:

RUN_LAST

Parameters:

container (Gtk.Container) – The object which received the signal

Gtk.Container.signals.remove(container, object)
Signal Name:

remove

Flags:

RUN_FIRST

Parameters:
Gtk.Container.signals.set_focus_child(container, object)
Signal Name:

set-focus-child

Flags:

RUN_FIRST

Parameters:

Property Details

Gtk.Container.props.border_width
Name:

border-width

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The width of the empty border outside the containers children

Gtk.Container.props.child
Name:

child

Type:

Gtk.Widget

Default Value:

None

Flags:

DEPRECATED, WRITABLE

Can be used to add a new child to the container

Deprecated since version ???.

Gtk.Container.props.resize_mode
Name:

resize-mode

Type:

Gtk.ResizeMode

Default Value:

Gtk.ResizeMode.PARENT

Flags:

DEPRECATED, READABLE, WRITABLE, EXPLICIT_NOTIFY

Specify how resize events are handled

Deprecated since version ???.