Viewport


Object Hierarchy:

Object hierarchy for Viewport

Description:

[ CCode ( type_id = "gtk_viewport_get_type ()" ) ]
public class Viewport : Bin, Implementor, Buildable, Scrollable

Implements scrollability for widgets that don't support scrolling on their own.

Use `GtkViewport` to scroll child widgets such as `GtkGrid`, `GtkBox`, and so on.

The `GtkViewport` will start scrolling content only if allocated less than the child widget’s minimum size in a given orientation.

CSS nodes

`GtkViewport` has a single CSS node with name `viewport`.

Accessibility

Until GTK 4.10, `GtkViewport` used the [enum@Gtk.AccessibleRole.group] role.

Starting from GTK 4.12, `GtkViewport` uses the [enum@Gtk.AccessibleRole.generic] role.


Namespace: Gtk
Package: gtk+-3.0

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Widget
All known members inherited from interface Atk.Implementor