RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TScrollBar.Scroll Method

Triggers an OnScroll event with the given ScrollCode parameter and updates the ScrollPos variable that is passed.

Pascal
procedure Scroll(ScrollCode: TScrollCode; var ScrollPos: Integer); dynamic;
C++
__fastcall Scroll(TScrollCode ScrollCode, int ScrollPos);

Scroll is a protected routine in the TScrollBar class that is used to trigger an OnScroll event, with the given ScrollCode parameter.  

Scroll also updates the value of the ScrollPos variable that is passed.  

The following table gives the possible values for the ScrollCode parameter.

Value 
Meaning 
scLineUp  
User clicked the top or left scroll arrow or pressed the Up or Left arrow key.  
scLineDown  
User clicked the bottom or right scroll arrow or pressed the Down or Right arrow key.  
scPageUp  
User clicked the area to the left of the thumb tab or pressed the PgUp key.  
scPageDown  
User clicked the area to the right of the thumb tab or pressed the PgDn key.  
scPosition  
User positioned the thumb tab and released it.  
scTrack  
User is moving the thumb tab.  
scTop  
User moved the thumb tab to the top or leftmost on the scroll bar.  
scBottom  
User moved the thumb tab to the bottom or rightmost on the scroll bar.  
scEndScroll  
User finished moving the thumb tab on the scroll bar.  

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!