---
name: "Gtk2::Box"
section: "3pm"
platform: "linux"
package: "libgtk2-perl-doc"
version: "2:1.24992-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk2::Box"
---

# Gtk2::Box(3pm)

wrapper for GtkBox

## NAME

Gtk2::Box - wrapper for GtkBox

## HIERARCHY

```
  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget
                 +----Gtk2::Container
                      +----Gtk2::Box
```

## INTERFACES

```
  Glib::Object::_Unregistered::AtkImplementorIface
  Gtk2::Buildable
  Gtk2::Orientable
```

## METHODS

### $box-\>set\_child\_packing ($child, $expand, $fill, $padding, $pack\_type)

- •

  `$child` (Gtk2::Widget)

- •

  `$expand` (boolean)

- •

  `$fill` (boolean)

- •

  `$padding` (integer)

- •

  `$pack_type` (Gtk2::PackType)

### boolean = $box-\>get\_homogeneous

### $box-\>set\_homogeneous ($homogeneous)

- •

  `$homogeneous` (boolean)

### $box-\>pack\_end ($child, $expand, $fill, $padding)

- •

  `$child` (Gtk2::Widget)

- •

  `$expand` (boolean)

- •

  `$fill` (boolean)

- •

  `$padding` (integer)

### $box-\>pack\_end\_defaults ($widget)

- •

  `$widget` (Gtk2::Widget)

### $box-\>pack\_start ($child, $expand, $fill, $padding)

- •

  `$child` (Gtk2::Widget)

- •

  `$expand` (boolean)

- •

  `$fill` (boolean)

- •

  `$padding` (integer)

### $box-\>pack\_start\_defaults ($widget)

- •

  `$widget` (Gtk2::Widget)

### list = $box-\>query\_child\_packing ($child)

- •

  `$child` (Gtk2::Widget)

### $box-\>reorder\_child ($child, $position)

- •

  `$child` (Gtk2::Widget)

- •

  `$position` (integer)

### integer = $box-\>get\_spacing

### $box-\>set\_spacing ($spacing)

- •

  `$spacing` (integer)

## PROPERTIES

- 'homogeneous' (boolean : default false : readable / writable / private)

  Whether the children should all be the same size

- 'spacing' (integer : default 0 : readable / writable / private)

  The amount of space between children

## CHILD PROPERTIES

- 'expand' (boolean : default true : readable / writable / private)

  Whether the child should receive extra space when the parent grows

- 'fill' (boolean : default true : readable / writable / private)

  Whether extra space given to the child should be allocated to the child or used as padding

- 'pack-type' (Gtk2::PackType : default "start" : readable / writable / private)

  A GtkPackType indicating whether the child is packed with reference to the start or end of the parent

- 'padding' (Glib::UInt : default 0 : readable / writable / private)

  Extra space to put between the child and its neighbors, in pixels

- 'position' (integer : default 0 : readable / writable / private)

  The index of the child in the parent

## ENUMS AND FLAGS

### enum Gtk2::PackType

- •

  'start' / 'GTK\_PACK\_START'

- •

  'end' / 'GTK\_PACK\_END'

## SEE ALSO

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container

## COPYRIGHT

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL.  See Gtk2 for a full notice.
