天天看點

delphi 觸摸 手勢

delphi手勢,左右滑動,

控件的OnGesture事件寫代碼。

放一個TGestureManager控件,設定控件的touch屬性為TGestureManager控件。

然後勾選控件的Touch>Gestures>Standard>裡的手勢類型,left,right,up,down等等,然後在OnGesture事件就可以捕捉到了。

官方的手勢圖

http://docwiki.embarcadero.com/RADStudio/Berlin/en/TStandardGesture_Enum

Field

Description

GestureID

The ID of the gesture that is emitted. ID is an integer value uniquely identifying the gesture.

Location

The current point on the control's surface. Location contains the X and Y coordinates of the last known point.

Flags

A set of TInteractiveGestureFlag options describing the state of the interactive gesture. Flags is only valid if the gesture is interactive.

Angle

The angle in radians (rad) in which either the finger or a gesturing device has moved relative to the screen coordinates.

Angle is only set for the rotation gesture (TInteractiveGesture = Rotate):

Angle is negative if rotation is clockwise.

Angle is positive if rotation is counter-clockwise.

Distance

The distance in pixels from the current point, given by Location, and the previous point.

Distance is only set for the zoom and two finger tap gestures (TInteractiveGesture = Zoom or TwoFingerTap). Distance is the distance between the two fingers or gesturing devices that are making the gesture.

InertiaVector

The inertia speed given by an X and Y pair. A positive X value means inertia toward the right of the screen, while a negative value means inertia to the left. A positive Y value means inertia toward the bottom of the screen, while a negative value means inertia to the top. InertiaVector is only valid if the event is interactive.

TapLocation

Specifies the coordinates of the "tap" and "press and tap" (igPressAndTap) gestures.

傳回鍵

touch與mouseup事件,先出發mouseUp事件,然後才觸發ontouch事件。

下一篇: 環境變量