PageDown

Description

Occurs when the user clicks in the open space below the scroll box.

Event ID

Event ID

Objects

pbm_sbnpagedown

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. For the scroll bar arrows, use the LineUp and LineDown events; for clicks in the scroll bar background above and below the thumb, use the PageUp and PageDown events; for dragging the thumb itself, use the Moved event.

Examples

Example 1

Example 1 This code in the VScrollBar’s PageDown event uses a predetermined paging value stored in the instance variable ii_pagesize to change the position of the scroll box (you would need additional code to change the view of associated controls according to the scroll bar position):

IF This.Position > &

   This.MaxPosition - ii_pagesize THEN

   This.Position = MaxPosition

ELSE

   This.Position = This.Position + ii_pagesize

END IF

RETURN 0

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 forward through a DataWindow control 10 rows for each page:

long ll_currow, ll_nextrow


This.Position = This.Position + ii_pagesize

ll_currow = dw_1.GetRow()

ll_nextrow = ll_currow + 10

dw_1.ScrollToRow(ll_nextrow)

dw_1.SetRow(ll_nextrow)

See also