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.

procedure TForm1.GridPanelLayout1Gesture(Sender: TObject;
const EventInfo: TGestureEventInfo; var Handled: Boolean);
begin
case EventInfo.GestureID of
sgiRight://向右滑动
begin end;
end;
end;
case EventInfo.GestureID of
sgiLeft:
begin
if TabControl1.ActiveTab <> TabControl1.Tabs[TabControl1.TabCount - ] then
TabControl1.ActiveTab := TabControl1.Tabs[TabControl1.TabIndex + ];
Handled := True;
end; sgiRight:
begin
if TabControl1.ActiveTab <> TabControl1.Tabs[] then
TabControl1.ActiveTab := TabControl1.Tabs[TabControl1.TabIndex - ];
Handled := True;
end;
end;

返回键

procedure TTabbedwithNavigationForm.FormKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState);
begin
if Key = vkHardwareBack then
begin
if (TabControl1.ActiveTab = TabItem1) and (TabControl2.ActiveTab = TabItem6) then
begin
TabControl2.Previous;
Key := ;
end;
end;

touch与mouseup事件,先出发mouseUp事件,然后才触发ontouch事件。

delphi 触摸 手势的更多相关文章

  1. Android 触摸手势基础 官方文档概览

    Android 触摸手势基础 官方文档概览 触摸手势检测基础 手势检测一般包含两个阶段: 1.获取touch事件数据 2.解析这些数据,看它们是否满足你的应用所支持的某种手势. 相关API: Moti ...

  2. 移动开发框架,Hammer.js&nbsp;移动设备触摸手势js库

    hammer.js是一个多点触摸手势库,能够为网页加入Tap.DoubleTap.Swipe.Hold.Pinch.Drag等多点触摸事件,免去自己监听底层touchstart.touchmove.t ...

  3. Android 触摸手势基础 官方文档概览2

    Android 触摸手势基础 官方文档概览 触摸手势检测基础 手势检测一般包含两个阶段: 1.获取touch事件数据 2.解析这些数据,看它们是否满足你的应用所支持的某种手势. 相关API: Moti ...

  4. 移动开发框架,第【二】弹:Hammer.js 移动设备触摸手势js库

    hammer.js是一个多点触摸手势库,能够为网页加入Tap.Double Tap.Swipe.Hold.Pinch.Drag等多点触摸事件,免去自己监听底层touchstart.touchmove. ...

  5. 20个Mac用户必须掌握的触摸手势

    我第一次接触MacBook时,最令我惊叹的就是MacBook的触摸板,通过各种手势,完全可以不用鼠标,且有些时候更加的快捷和方便.那么都有哪些手势呢?可以通过 -> 来查看学习各种手势的使用,下 ...

  6. Android之触摸手势检测GestureDetector使用详解

    在Android中,当用户触摸屏幕的时候,会产生许多手势,例如down,up,scroll,filing,onSingleTapConfirmed(单击),onDoubleTap(双击)等等. 一般情 ...

  7. Qt for android触摸手势事件QGestureEvent

    在触摸设备上可以使用Qt的手势事件 要激活手势事件,需要执行以下操作: 第一步,为QWidget控件注册手势事件 QList<Qt::GestureType> gestures; gest ...

  8. 错误总结之播放器(vitamio)音量实体键与触摸手势控制,音量调节冲突

    这个但是独家心得:经过几天的网上资料查询未果,在群里遇到一同行. 然后让他帮我看了看,终于攻克了该冲突. 此时,谨以此来感谢那位同僚的热情帮助: 说说这个问题吧: 眼下我在做一款影视方面的项目,在该项 ...

  9. Quo JS多种触摸手势轻量级JavaScript库

    http://www.uedsc.com/quo-js.html http://quojs.tapquo.com/

随机推荐

  1. js将json格式的list转换为按某个字段分组的map数组

    这几天做的微信公众号项目中,出现了需要将list分组显示的需求,解决方法如下 var data = [{ "id": "32b80b76-a81e-4545-8065-1 ...

  2. Python在七牛云平台的应用(一)

    七牛云:(引用百度的介绍)七牛云是国内领先的企业级公有云服务商,致力于打造以数据为核心的场景化PaaS服务.围绕富媒体场景,七牛先后推出了对象存储,融合CDN加速,数据通用处理,内容反垃圾服务,以及直 ...

  3. [转] oracle 监听

    oracle 监听 启动监听:lsnrctl start 查看监听:lsnrctl status 停止监听:lsnrctl stop 1.oracle 数据服务器包括:实例进程和数据库: 实例进程包括 ...

  4. 出错的sql

    alter table m_account  AUTO_INCREMENT=200029860;

  5. IOS-快速集成检查更新

    一直以为Appstore有了检查版本是否更新的机制,我们在APP上做这个更新功能会被拒,但是也有看到一些APP也是做了这个更新功能的.因为在网上没有找到完全正确的方法能获取到iTunes里的数据的,于 ...

  6. COM 学习

    一.COM (Component Object Model) 二.COM+ (Component Services) 三.DCOM (Distributed Component Object Mode ...

  7. redux中的compose源码分析

    1. redux中compose用来组合各种中间件来实现链式调用,例子如下 compose( applyMiddleware, devTools, persistState, createStore ...

  8. scikit-learn 学习笔记-- Generalized Linear Models (二)

    Lasso regression 今天介绍另外一种带正则项的线性回归, ridge regression 的正则项是二范数,还有另外一种是一范数的,也就是lasso 回归,lasso 回归的正则项是系 ...

  9. (转)List<T>的各种排序方法

    近日,在工作的时候遇到要对一个大的List<T>集合进行排序,于是就了解下各种List<T>的排序方法. 首先,排序自然就会想到用Sort方法,看看List<T>的 ...

  10. NameError: name 'picamera' is not defined

    /********************************************************************************* * NameError: name ...