Partager via


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 [nIndex], nDirection

Parameters

  • nIndex
    Uniquely identifies a control if it is in a control array.
  • 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 key
    1 DOWN ARROW key
    2 Vertical scroll bar in area above the scroll box
    3 Vertical scroll bar in area below the scroll box
    4 LEFT ARROW key
    5 RIGHT ARROW key
    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.

See Also

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

Applies To: Form | Grid