CenterBox


Object Hierarchy:

Gtk.CenterBox Gtk.CenterBox Gtk.CenterBox Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.CenterBox GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Gtk.Accessible Gtk.Accessible Gtk.Accessible->Gtk.CenterBox Gtk.Accessible->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.CenterBox Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget Gtk.ConstraintTarget Gtk.ConstraintTarget->Gtk.CenterBox Gtk.ConstraintTarget->Gtk.Widget Gtk.Orientable Gtk.Orientable Gtk.Orientable->Gtk.CenterBox

Description:

[ CCode ( type_id = "gtk_center_box_get_type ()" ) ]
public class CenterBox : Widget, Accessible, Buildable, ConstraintTarget, Orientable

`GtkCenterBox` arranges three children in a row, keeping the middle child centered as well as possible.

![An example GtkCenterBox](centerbox.png)

To add children to `GtkCenterBox`, use [[email protected]_start_widget], [[email protected]_center_widget] and [ [email protected]_end_widget].

The sizing and positioning of children can be influenced with the align and expand properties of the children.

GtkCenterBox as GtkBuildable

The `GtkCenterBox` implementation of the `GtkBuildable` interface supports placing children in the 3 positions by specifying “start”, “center” or “end” as the “type” attribute of a <child> element.

CSS nodes

`GtkCenterBox` uses a single CSS node with the name “box”,

The first child of the `GtkCenterBox` will be allocated depending on the text direction, i.e. in left-to-right layouts it will be allocated on the left and in right-to-left layouts on the right.

In vertical orientation, the nodes of the children are arranged from top to bottom.

Accessibility

`GtkCenterBox` uses the gtk_accessible_role_group role.


Namespace: Gtk
Package: gtk4

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
All known members inherited from interface Gtk.Orientable



2022 vala-language.org