event OffsetChanged (Group as Group, Horizontal as Boolean, NewVal as Long)
Occurs when the scroll position is changed.

 TypeDescription 
   Group as Group A Group object where the scroll position is changed.  
   Horizontal as Boolean A boolean expression that indicates whether the horizontal scroll bar has changed.  
   NewVal as Long A long value that indicates the new scroll bar value in pixels.  
If the group has no scroll bars the OffsetChanged and OversizeChanged events are not fired. Use the ScrollBars property of the control to determine which scroll bars are visible within the control.

The following sample displays the position of the scroll bar that user changes:

Private Sub ExplorerTree1_OffsetChanged(ByVal Group As EXPLORERTREELibCtl.IGroup, ByVal Horizontal As Boolean, ByVal NewVal As Long)
    Debug.Print "The user changes the " & IIf(Horizontal, "horizontal", "vertical") & " scroll bar position. The new position is " & NewVal
End Sub

Send comments on this topic.
© 1999-2008 Exontrol Inc, Software. All rights reserved.