Package: gtk

Function gtk-scrolled-window-add-with-viewport

Lambda List

gtk-scrolled-window-add-with-viewport (scrolled-window child)


scrolled-window -- a gtk-scrolled-window container
child -- the widget you want to scroll


Used to add children without native scrolling capabilities. 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 the function gtk-container-add instead of this function.

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

A widget supports scrolling natively if it implements the gtk-scrollable interface.