gtk-bin, gtk-container, gtk-widget, g-initially-unowned, gtk-buildable, g-object, common-lisp:standard-object, common-lisp:t
gtk-scrolled-window is a gtk-bin subclass: it is a container the accepts a single child widget. gtk-scrolled-window adds scrollbars to the child widget and optionally draws a beveled frame around the child widget.
The scrolled window can work in two ways. Some widgets have native scrolling support; these widgets implement the gtk-scrollable interface. Widgets with native scroll support include gtk-tree-view, gtk-text-view, and gtk-layout.
For widgets that lack native scrolling support, the gtk-viewport widget acts as an adaptor class, implementing scrollability for child widgets that lack their own scrolling capabilities. Use gtk-viewport to scroll child widgets such as gtk-grid, gtk-box, and so on.
If a widget has native scrolling abilities, it can be added to the gtk-scrolled-window with the function gtk-container-add. If a widget does not, you must first add the widget to a gtk-viewport, then add the gtk-viewport to the scrolled window. The convenience function gtk-scrolled-window-add-with-viewport does exactly this, so you can ignore the presence of the viewport.
The position of the scrollbars is controlled by the scroll adjustments. See the function gtk-adjustment for the fields in an adjustment - for gtk-scrollbar, used by gtk-scrolled-window, the value slot represents the position of the scrollbar, which must be between the lower slot and upper - page-size. The page-size slot represents the size of the visible scrollable area. The step-increment and page-increment slot are used when the user asks to step down (using the small stepper arrows) or page down (using for example the PageDown key).
If a gtk-scrolled-window does not behave quite as you would like, or does not have exactly the right layout, it is very possible to set up your own scrolling with gtk-scrollbar and for example a gtk-grid.
Style Property Details
The "scrollbar-spacing" style property"scrollbar-spacing" of type :int (Read)
Number of pixels between the scrollbars and the scrolled window.
Allowed values: >= 0
Default value: 3
The "scrollbars-within-bevel" style property"scrollbars-within-bevel" of type :boolean (Read)
Whether to place scrollbars within the scrolled window's bevel.
Default value: nil
The "move-focus-out" signal
lambda (scrolled-window direction-type) : ActionThe "move-focus-out" signal is a keybinding signal which gets emitted when focus is moved away from the scrolled window by a keybinding. The "move-focus" signal is emitted with direction-type on this scrolled windows toplevel parent in the container hierarchy. The default bindings for this signal are Tab+Ctrl and Tab+Ctrl+Shift.
The "scroll-child" signal
lambda (scrolled-window scroll horizontal) : ActionThe "scroll-child" signal is a keybinding signal which gets emitted when a keybinding that scrolls is pressed. The horizontal or vertical adjustment is updated which triggers a signal that the scrolled windows child may listen to and scroll itself.
Slot Access Functions
Inherited Slot Access Functions