---
name: "Gtk2::AspectFrame"
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::AspectFrame"
---

# Gtk2::AspectFrame(3pm)

wrapper for GtkAspectFrame

## NAME

Gtk2::AspectFrame - wrapper for GtkAspectFrame

## HIERARCHY

```
  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget
                 +----Gtk2::Container
                      +----Gtk2::Bin
                           +----Gtk2::Frame
                                +----Gtk2::AspectFrame
```

## INTERFACES

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

## METHODS

### widget = Gtk2::AspectFrame-\>new ($label, $xalign, $yalign, $ratio, $obey\_child)

- •

  `$label` (string or undef)

- •

  `$xalign` (double)

- •

  `$yalign` (double)

- •

  `$ratio` (double)

- •

  `$obey_child` (boolean)

### $aspect\_frame-\>set\_params ($xalign, $yalign, $ratio, $obey\_child)

- •

  `$xalign` (double)

- •

  `$yalign` (double)

- •

  `$ratio` (double)

- •

  `$obey_child` (boolean)

## PROPERTIES

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

  Force aspect ratio to match that of the frame's child

- 'ratio' (float : default 1 : readable / writable / private)

  Aspect ratio if obey\_child is FALSE

- 'xalign' (float : default 0.5 : readable / writable / private)

  X alignment of the child

- 'yalign' (float : default 0.5 : readable / writable / private)

  Y alignment of the child

## SEE ALSO

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

## COPYRIGHT

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

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