Click or drag to resize

ScrollEvent Class

X#
Provide information about a ScrollEvent, generated when a scroll bar is manipulated.
Inheritance Hierarchy
Object
  Event
    ScrollEvent
      SliderEvent

Namespace:  VO
Assembly:  VOGUIClasses (in VOGUIClasses.dll) Version: 2.21
Syntax
 CLASS ScrollEvent INHERIT Event
Request Example View Source

The ScrollEvent type exposes the following members.

Constructors
  NameDescription
Public methodScrollEvent
Initializes a new instance of the ScrollEvent class
Top
Properties
  NameDescription
Public propertyHandle
The pointer to the window where the event occurred
(Inherited from Event.)
Public propertyIsWindowScroll
A logical value indicating whether the scroll bar which generated this ScrollEvent was a window scroll bar or a free-standing scroll bar.
Public propertyMessage
A dword representing the Windows API message associated with the given event.
(Inherited from Event.)
Public propertyOldPosition
A numeric value representing the old position of the thumb in a scroll bar when this ScrollEvent occurred (that is, where the thumb was located before being manipulated by the user).
Public propertyPosition
A numeric value representing the desired position of the thumb in a scroll bar when this ScrollEvent occurred (that is, where the user has newly positioned the thumb).
Public propertyScrollBar
The scroll bar that generated this ScrollEvent.
Public propertyScrollBarID
The ID of the scroll bar that generated this ScrollEvent.
Public propertyTYPE
A string representing the type of scrolling action that took place when this ScrollEvent occurred.
Public propertyWindow
An object indicating the window or control in which the event occurred. This is helpful, for example, for distinguishing between similar menu events coming from the same context menu attached to different controls.
(Inherited from Event.)
Top
Fields
  NameDescription
Public fieldhWnd (Inherited from Event.)
Public fieldlParam (Inherited from Event.)
Public fieldoWindow (Inherited from Event.)
Public fielduMsg (Inherited from Event.)
Public fieldwParam (Inherited from Event.)
Top
Remarks
ScrollEvent events go to either Window:VerticalScroll() or Window:HorizontalScroll(), depending on whether a vertical or horizontal scroll bar generated the event. A ScrollEvent reports the following: what scroll bar caused the event, what type of scroll movement is requested, and whether the scroll bar is a window or a free-standing scroll bar. It also reports the old scroll bar position and the desired position. The old position is where the thumb was located before being manipulated by the user; the desired position is where the user has newly positioned the thumb (if the thumb is manipulated directly or calculated from the block and unit sizes).
Examples
Normally, when you receive a ScrollEvent, you would update the scroll bar's thumb position with code similar to the following:
X#
1aScrollEvt:ScrollBar:ThumbPosition := aScrollEvt:Position
See Also

Reference