Window_ScrollScrollingWindow()

Examples


The Window_ScrollScrollingWindow() function causes the contents of a scrolling window to scroll to the next or previous record. It is intended for use within single-line scrolling windows.

Syntax

Window_ScrollScrollingWindow(window window_name, scroll_type)

Parameters

window window_name – The scrolling window to be scrolled.

scroll_type – An integer indicating how the scrolling window should be scrolled. Use one of the following constants:

[spacer]

Constant

Description

SCROLLTYPE_NEXT

Scrolls to the next record.

SCROLLTYPE_PREV

Scrolls to the previous record.


Return value

An integer corresponding to one of the following constants:

[spacer]

Constant

Description

FOCUS_OK

The scrolling window was scrolled successfully.

FOCUS_DENIED

The scrolling window could not be scrolled because a line was already locked in the scrolling window.

FOCUS_DIVERTED

The scrolling window could not be scrolled because a focus statement prevented the focus from remaining on the same field in the new line to be displayed.

FOCUS_RESTART

The scrolling window could not be scrolled because a restart field statement prevented the focus from moving.

FOCUS_NOEXIST

The scrolling window could not be scrolled because the record to be displayed has been deleted.

FOCUS_NOEXIST_EOF

The scrolling window could not be scrolled because the end of the table was reached.

FOCUS_NOEXIST_SOF

The scrolling window could not be scrolled because the beginning of the table was reached.

FOCUS_NOT_IN_SWIN

Attempted to call the function from outside of the scrolling window.


Comments

A single-line scrolling window is created when the small line item or the big line item is set to use the entire scrolling window area. When used in this way, a scrolling window displays only one record of information at a time. Push buttons in the scrolling window are typically used to move to the next or previous records. The change scripts attached to these push buttons use the Window_ScrollScrollingWindow() function to perform the scrolling.

When the Window_ScrollScrollingWindow() function is used to scroll the scrolling window, it attempts to maintain the focus on the same field that was focused in the previous line.

This function cannot be used in a change script for a push button that has the Hyperspace property set to true.



Documentation Feedback