[Contents] [Index] [Next] [Previous]

Scrollable Component Navigation


Certain components, such as List and Text, have built-in support for scrolling. However, any component or group of components can be associated with scrolling components or placed inside a ScrolledWindow and made scrollable.

A scrollable component generally has ScrollBars or some other type of scrolling component associated with it. When a component does not have a scrolling component associated with it, it generally should not be scrollable; however, components whose visible contents alone indicate that additional items exist beyond the bounds of the visible area, like Text, can be scrollable even if they do not have an associated scrolling component.

Any scrollable component must support the appropriate navigation and scrolling operations. You must use the page navigation keys , , [PageLeft] or , and [PageRight] or for scrolling the visible region by a page increment. A page is the portion of data that is visible, not any underlying structure of the data. When scrolling by a page, you must leave at least one unit of overlap between the old and new pages; for example, a line in a Text component.

If the location cursor can be made visible, it must be. It should be moved within the component so that it remains as near as possible to its original location in the viewport. However, if a navigation key (including directional and page navigation keys) is pressed while the [ScrollLock] key is down, the navigation key should be interpreted as specified for an associated ScrollBar-that is, it causes scrolling, while leaving the position of the cursor within the scrollable component unchanged. See the ScrollBar reference page in Controls, Groups, and Models Reference Pages.

You should use the directional keys , , , and for moving the location cursor among elements, moving the location cursor by increments, or scrolling the visible region by regular increments. In general, keyboard operations should traverse through the entire scrollable component, not just through the visible portion.

When a mouse button is pressed initiating a selection operation within a scrollable component, and the pointer is then dragged outside of the scrollable component, the component should scroll toward the pointer. This is called autoscrolling. Drag and drop operations should produce similar scrolling behavior within scrollable components that force dragged elements to remain within the component. Releasing the button outside of the component must not do any transfer in these cases. Parking the cursor on the edge of the scrollable component during the drag and drop operation should scroll the component toward the pointer.

When the location cursor is within a scrollable component, scrolling can move the cursor out of view; however, any keyboard operation that moves the cursor to or in the component, or that inserts, deletes, or modifies items at the cursor location must scroll the component so that the cursor is visible when the operation is complete. When scrolling using the mouse, the location cursor can be allowed to scroll out of the visible region. When scrolling using the keyboard, the location cursor must be moved so that it remains within the visible region, if that is possible.

If a mouse-based scrolling action is in progress, must cancel the scrolling action and return the slider to its position prior to the start of the scrolling operation.