Package: gtk

Class gtk:viewport

Superclasses

Documented Subclasses

None

Direct Slots

child
The child property of type gtk:widget (Read / Write)
The child widget of the viewport.
scroll-to-focus
The scroll-to-focus property of type :boolean (Read / Write)
Whether to scroll when the focus changes.
Default value: true

Details

The gtk:viewport widget acts as an adaptor class, implementing scrollability for child widgets that lack their own scrolling capabilities. Use the gtk:viewport widget to scroll child widgets such as the widgets gtk:grid, gtk:box, and so on.

The gtk:viewport widget will start scrolling content only if allocated less than the minimum size of the child widget in a given orientation.

CSS nodes

The gtk:viewport widget has a single CSS node with name viewport.

Accessibility

The gtk:viewport implementation uses the :group role of the gtk:accessible-role enumeration.
 

Slot Access Functions

Inherited Slot Access Functions

See also

2024-7-5