Scrolled Event

Occurs in a Grid control or form when the horizontal or vertical scroll bars are clicked or a scroll box is moved.

PROCEDURE Object.Scrolled
LPARAMETERS nDirection

Parameters

  • nDirection
    Specifies how the user scrolled through the contents of a Grid control or a form. The possible values are:
    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 vertical scroll bar
    5 Right arrow on vertical 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

The Scrolled event also occurs for a grid if you call the DoScroll method from within a program. The Scrollbars property determines if a form has scroll bars.

Avoid creating wait states (for example, WAIT WINDOW) within the Scrolled event because screen painting problems can occur when the grid or form is scrolled.

The Scrolled event does not fire in reaction to the keyboard arrow keys.

See Also

ActiveColumn Property | ActiveRow Property | DoScroll Method | RelativeColumn Property | RelativeRow Property | ScrollBars Property

Applies To: Form | Grid