FMX.Layouts.TCustomScrollBox.ScrollBy
Delphi
procedure ScrollBy(const Dx, Dy: Single);
C++
void __fastcall ScrollBy(const float Dx, const float Dy);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FMX.Layouts.pas FMX.Layouts.hpp |
FMX.Layouts | TCustomScrollBox |
Description
Scrolls the view according to the given Dx
and Dy
offsets (relative to the current position) in the TScrollBox control.
The Dx
and Dy
parameters specify offsets to the values of the horizontal and vertical scroll bars assigned to the TScrollBox control. This means that the Dx
parameter is the change in pixels horizontally (along the X axis), and the Dy
parameter is the change in pixels vertically (along the Y axis).
ScrollBy has the effect of scrolling the view, in the TScrollBox control, to the new coordinates defined by the new values of the horizontal and vertical scroll bars. These new values are obtained from the current values of the vertical and horizontal scroll bars by decreasing them by Dx
and Dy
pixels, respectively. For example, if Dx
is a negative value, ScrollBy scrolls the view to the left; if Dx
is a positive value, ScrollBy scrolls the view to the right.
ScrollBy only has an effect if the scroll box actually has content beyond the display area, and the scroll bars are needed to view more of the content.
See Also
- FMX.Layouts.TCustomScrollBox.ViewportPosition
- FMX.InertialMovement.TAniCalculations.MouseWheel
- FMX.Layouts.TCustomScrollBox.Center
- FMX.Layouts.TCustomScrollBox.HScrollBarValue
- FMX.Layouts.TCustomScrollBox.VScrollBarValue
- FMX.Layouts.TCustomScrollBox.HScrollBar
- FMX.Layouts.TCustomScrollBox.VScrollBar
- FMX.StdCtrls.TScrollBar.Value
- FMX.KeyboardTypes Sample