PageUp

Description

Occurs when the user clicks in the open space above the scroll box (also called the thumb).

Event ID

Event ID

Objects

pbm_sbnpageup

VScrollBar, VTrackBar

Arguments

None

Returns

Long. Return code choices (specify in a RETURN statement):

Usage

When the user clicks in a vertical scroll bar, nothing happens unless you have scripts that change the scroll bar’s Position property:

Examples

Example 1

Example 1 This code in the PageUp event causes the thumb to move up when the user clicks on the up arrow of the vertical scroll bar (the page size is stored in the instance variable ii_pagesize):

IF This.Position < &

This.MinPosition + ii_pagesize THEN

   This.Position = MinPosition

ELSE

   This.Position = This.Position - ii_pagesize

END IF

Example 2

Example 2 This example changes the position of the scroll box by a predetermined page size stored in the instance variable ii_pagesize and scrolls backwards through a DataWindow control 10 rows for each page:

long ll_currow, ll_prevrow

This.Position = This.Position - ii_pagesize

ll_currow = dw_1.GetRow( )

ll_prevrow = ll_currow - 10

dw_1.ScrollToRow(ll_prevrow)

dw_1.SetRow(ll_prevrow)

See also