All Manuals > CAPI Reference Manual > 1 CAPI Reference Entries

NextPrevUpTopContentsIndex

get-scroll-position

Function
Summary

Returns the current scroll position of a pane such as list-panel , display-pane or tree-view .

Package

capi

Signature

get-scroll-position pane dimension => position

Arguments

pane

A pane with built-in scrolling.

dimension

A keyword, either :horizonta l or :vertical .

Values

position

An integer or nil .

Description

The function get-scroll-position returns the scroll position of the pane pane in the given dimension .

pane should be an instance of a pane class that has built-in scrolling. That is, the scrolling is implemented by the underlying widget. Examples include list-panel, display-pane and tree-view.

In general, the units in the returned value position are unspecified, but they can be passed to the generic function scroll with operation :move to restore the position.

For a list-panel, the vertical units are items.

position is nil if pane is not displayed on the screen, for example if get-scroll-position is called after pane is destroyed.

See also

get-horizontal-scroll-parameters
get-vertical-scroll-parameters
scroll


CAPI Reference Manual - 15 Dec 2011

NextPrevUpTopContentsIndex