ChartDirector 7.1 (C++ Edition)

ViewPortManager.dragTo


Usage

bool dragTo(int scrollDirection, double deltaX, double deltaY);

Description

Scrolls the viewport to reflect dragging of the underlying rectangular surface.

The amount of drag is measured as changed in mouse cursor coordinates since the call to ViewPortManager.startDrag. A positive change means the dragging is to the right or bottom. A negative change means the dragging is to the left or top.

The drag is considered as applying to the underlying surface. The viewport moves in the opposite direction to the drag. For example, dragging the underlying surface to the right is equivalent to moving the viewport to the left.

The viewport may not change at all if it has reached the borders of the underlying surface.

Arguments

ArgumentDefaultDescription
scrollDirection(Mandatory)The allowed scroll direction. Must be one of the predefined constants DirectionHorizontal, DirectionVertical and DirectionHorizontalVertical for horizontal, vertical and bi-directional scrolling.
deltaX(Mandatory)The change in mouse x-coordinates. A positive change means the drag is to the right. A negative change means the drag is to the right.
deltaY(Mandatory)The change in mouse y-coordinates. A positive change means the drag is to the bottom. A negative change means the drag is to the top.

Return Value

None