RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWinControl.ScrollBy Method

Scroll control contents.

Pascal
procedure ScrollBy(DeltaX: Integer; DeltaY: Integer);
C++
__fastcall ScrollBy(int DeltaX, int DeltaY);

Call ScrollBy to scroll the contents within the control. While ScrollBy can be used for any TWinControl, it makes the most sense to use it for descendants of TScrollingWinControl. 

Applications seldom need to call the ScrollBy method unless they implement their own scrolling interface rather than relying on a scroll bar. 

The DeltaX parameter is the change in pixels along the X axis. A positive DeltaX value scrolls the contents to the right; a negative value scrolls the contents to the left. The DeltaY parameter is the change in pixels along the Y axis. A positive DeltaY value scrolls the contents down; a negative value scrolls the contents up. 

 

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