Object Hierarchy:

Object hierarchy for AspectFrame


[ CCode ( type_id = "gtk_aspect_frame_get_type ()" ) ]
public class AspectFrame : Widget, Accessible, Buildable, ConstraintTarget

The AspectFrame is useful when you want pack a widget so that it can resize but always retains the same aspect ratio.

For instance, one might be drawing a small preview of a larger image. AspectFrame derives from Frame, so it can draw a label and a frame around the child. The frame will be “shrink-wrapped” to the size of the child.

CSS nodes

GtkAspectFrame uses a CSS node with name frame.

Namespace: Gtk
Package: gtk4



Creation methods:


Inherited Members:

All known members inherited from class Gtk.Widget