Vcl.Controls.TWinControl.ScrollBy

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure ScrollBy(DeltaX, DeltaY: Integer);

C++

void __fastcall ScrollBy(int DeltaX, int DeltaY);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TWinControl

Description

Scroll control contents.

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.

See Also