Scrolled Event

Occurs in a Grid control or Form object when moving horizontal or vertical scroll bars or moving a scroll box. The Scrolled event also occurs for a grid if you call the DoScroll method from within a program. The Scrolled event does not occur when pressing keyboard arrow keys.

PROCEDURE Object.Scrolled
LPARAMETERS nDirection

Parameters

  • nDirection
    Specifies how the user scrolled through the contents of a Grid control or a form. The following table describes the possible values for nDirection.

    Value

    User scrolled using...

    0

    Up arrow on vertical scroll bar.

    1

    Down arrow on vertical scroll bar.

    2

    Vertical scroll bar in area above the scroll box.

    3

    Vertical scroll bar in area below the scroll box

    4

    Left arrow on horizontal scroll bar.

    5

    Right arrow on horizontal scroll bar.

    6

    Horizontal scroll bar in area to the left of the scroll box.

    7

    Horizontal scroll bar in area to the right of the scroll box.

Remarks

Applies To: Form | Grid

The Scrollbars property determines whether a form has scroll bars.

Screen painting problems can occur when the grid or form is scrolled. Therefore, avoid creating wait states, for example, using the WAIT WINDOW command, within the Scrolled event.

See Also

Reference

ActiveColumn Property

ActiveRow Property

DoScroll Method

RelativeColumn Property

RelativeRow Property

ScrollBars Property

Other Resources

Events (Visual FoxPro)