Viewport


Object Hierarchy:

Gtk.Viewport Gtk.Viewport Gtk.Viewport Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Viewport GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Gtk.Accessible Gtk.Accessible Gtk.Accessible->Gtk.Viewport Gtk.Accessible->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.Viewport Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget Gtk.ConstraintTarget Gtk.ConstraintTarget->Gtk.Viewport Gtk.ConstraintTarget->Gtk.Widget Gtk.Scrollable Gtk.Scrollable Gtk.Scrollable->Gtk.Viewport

Description:

[ CCode ( type_id = "gtk_viewport_get_type ()" ) ]
public sealed class Viewport : Widget, Accessible, Buildable, ConstraintTarget, Scrollable

`GtkViewport` implements scrollability for widgets that lack their own scrolling capabilities.

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 `GTK_ACCESSIBLE_ROLE_GROUP` role.

Starting from GTK 4.12, `GtkViewport` uses the `GTK_ACCESSIBLE_ROLE_GENERIC` role.


Namespace: Gtk
Package: gtk4

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class Gtk.Widget