add_with_viewport


Description:

[ Version ( deprecated = true , deprecated_since = "3.8" ) ]
public void add_with_viewport (Widget child)

Warning: add_with_viewport is deprecated since 3.8.

Used to add children without native scrolling capabilities.

Note:

add will automatically add a Viewport if the child doesn’t implement Scrollable.

This is simply a convenience function; it is equivalent to adding the unscrollable child to a viewport, then adding the viewport to the scrolled window. If a child has native scrolling, use add instead of this function.

The viewport scrolls the child by moving its Window, and takes the size of the child to be the size of its toplevel Window. This will be very wrong for most widgets that support native scrolling; for example, if you add a widget such as TreeView with a viewport, the whole widget will scroll, including the column headings. Thus, widgets with native scrolling support should not be used with the Viewport proxy.

A widget supports scrolling natively if it implements the Scrollable interface.

Parameters:

this

a ScrolledWindow

child

the widget you want to scroll