Viewport


Object Hierarchy:

Gtk.Viewport Gtk.Viewport Gtk.Viewport Gtk.Bin Gtk.Bin Gtk.Bin->Gtk.Viewport Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Container GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Atk.Implementor Atk.Implementor Atk.Implementor->Gtk.Viewport Atk.Implementor->Gtk.Bin Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.Viewport Gtk.Buildable->Gtk.Bin Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget Gtk.Scrollable Gtk.Scrollable Gtk.Scrollable->Gtk.Viewport

Description:

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

The Viewport widget acts as an adaptor class, implementing scrollability for child widgets that lack their own scrolling capabilities.

Use GtkViewport to scroll child widgets such as Grid, Box , and so on.

If a widget has native scrolling abilities, such as TextView, TreeView or IconView, it can be added to a ScrolledWindow with add. If a widget does not, you must first add the widget to a Viewport, then add the viewport to the scrolled window. add does this automatically if a child that does not implement Scrollable is added to a ScrolledWindow, so you can ignore the presence of the viewport.

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.


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 class GLib.Object
All known members inherited from interface Atk.Implementor



2022 vala-language.org