Scroll Methods

The following methods are used to scroll a dialog or dialog control and to set scroll bars.

Scroll

>>-aDialogControl~Scroll(--cx--,--cy--)------------------------><


The Scroll method scrolls the contents of the associated dialog or dialog control by the amount specified.

Arguments:

The arguments are:

cx

The number of screen pixels the content of the dialog or dialog control is to be scrolled to the right or to the left, if negative.

cy

The number of screen pixels the content of the dialog or dialog control is to be scrolled downward or upward, if negative.

Return value:

0

Scrolling was successful.

1

Scrolling failed.

HScrollPos

>>-aDialogControl~HScrollPos-----------------------------------><


The HScrollPos method returns the position of the horizontal scroll bar in the associated dialog or dialog control.

Return value:

The position of the horizontal scroll bar.

VScrollPos

>>-aDialogControl~VScrollPos-----------------------------------><


The VScrollPos method returns the position of the vertical scroll bar in the associated dialog or dialog control.

Return value:

The position of the vertical scroll bar.

SetHScrollPos

                                               +-1------+
>>-aDialogControl~SetHScrollPos(--position--,--+--------+--)---><
                                               +-redraw-+


The SetHScrollPos method sets the thumb position of the horizontal scroll bar contained in the associated dialog or dialog control.

Arguments:

The arguments are:

position

The new thumb position of the horizontal scroll bar.

redraw

If this argument is 1 (the default), the display of the scroll bar is updated.

Return value:

The previous position of the horizontal scroll bar, or 0 if this method failed.

SetVScrollPos

                                               +-1------+
>>-aDialogControl~SetVScrollPos(--position--,--+--------+--)---><
                                               +-redraw-+


The SetVScrollPos method sets the thumb position of the vertical scroll bar contained in the associated dialog or dialog control.

Arguments:

The arguments are:

position

The new thumb position of the vertical scroll bar.

redraw

If this argument is 1 (the default), the display of the scroll bar is updated.

Return value:

The previous position of the vertical scroll bar, or 0 if this method failed.