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):
|
|
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 触摸 手势的更多相关文章
- Android 触摸手势基础 官方文档概览
Android 触摸手势基础 官方文档概览 触摸手势检测基础 手势检测一般包含两个阶段: 1.获取touch事件数据 2.解析这些数据,看它们是否满足你的应用所支持的某种手势. 相关API: Moti ...
- 移动开发框架,Hammer.js 移动设备触摸手势js库
hammer.js是一个多点触摸手势库,能够为网页加入Tap.DoubleTap.Swipe.Hold.Pinch.Drag等多点触摸事件,免去自己监听底层touchstart.touchmove.t ...
- Android 触摸手势基础 官方文档概览2
Android 触摸手势基础 官方文档概览 触摸手势检测基础 手势检测一般包含两个阶段: 1.获取touch事件数据 2.解析这些数据,看它们是否满足你的应用所支持的某种手势. 相关API: Moti ...
- 移动开发框架,第【二】弹:Hammer.js 移动设备触摸手势js库
hammer.js是一个多点触摸手势库,能够为网页加入Tap.Double Tap.Swipe.Hold.Pinch.Drag等多点触摸事件,免去自己监听底层touchstart.touchmove. ...
- 20个Mac用户必须掌握的触摸手势
我第一次接触MacBook时,最令我惊叹的就是MacBook的触摸板,通过各种手势,完全可以不用鼠标,且有些时候更加的快捷和方便.那么都有哪些手势呢?可以通过 -> 来查看学习各种手势的使用,下 ...
- Android之触摸手势检测GestureDetector使用详解
在Android中,当用户触摸屏幕的时候,会产生许多手势,例如down,up,scroll,filing,onSingleTapConfirmed(单击),onDoubleTap(双击)等等. 一般情 ...
- Qt for android触摸手势事件QGestureEvent
在触摸设备上可以使用Qt的手势事件 要激活手势事件,需要执行以下操作: 第一步,为QWidget控件注册手势事件 QList<Qt::GestureType> gestures; gest ...
- 错误总结之播放器(vitamio)音量实体键与触摸手势控制,音量调节冲突
这个但是独家心得:经过几天的网上资料查询未果,在群里遇到一同行. 然后让他帮我看了看,终于攻克了该冲突. 此时,谨以此来感谢那位同僚的热情帮助: 说说这个问题吧: 眼下我在做一款影视方面的项目,在该项 ...
- Quo JS多种触摸手势轻量级JavaScript库
http://www.uedsc.com/quo-js.html http://quojs.tapquo.com/
随机推荐
- Gitea docker-compose.yaml
docker-compose.yaml version: "2" networks: gitea: external: false services: server: image: ...
- ENUMSTXT.H中的指针数组
/************************************************************************ ...
- 有效二叉查找树判断(java实现)
leetcode 原题 :(即判断二叉树是否为二叉查找树) Given a binary tree, determine if it is a valid binary search tree (BS ...
- fatal error: openssl/evp.h: 没有那个文件或目录
在陆佳华<嵌入式系统软硬件协同设计实战指南 第2版>一书的第13章节 编译U-boot时会遇到2个错误.原因很简单,就从一开始的错误提示着手: fatal error: openssl/e ...
- [Tomcat无法启动]'Starting Tomcat v8.0 Server at localhost' has encountered a problem.
运行一个index.jsp,运行提示如下错误:点击服务器 解决办法1: 点击Tomcat服务器,将服务器里的web工程删除掉,再重新运行index.jsp. 解决办法2: 关闭Tomcat,最简单的方 ...
- PostgreSQL锁级别及什么操作获取什么锁
表级锁 大多数的表级锁是由内置的 SQL 命令获得的,但他们也可以通过锁命令来明确获取.可使用的表级锁包括: 访问共享(ACCESS SHARE) - SELECT 命令可在查询中引用的表上获得该锁. ...
- iOS-----使用GCD实现多线程
使用GCD实现多线程 GCD的两个核心概念如下: 队列 队列负责管理开发者提交的任务,GCD队列始终以FIFO(先进先出)的方式来处理任务---但 由于任务的执行时间并不相同,因此先处理的任务并一定先 ...
- 20155236 2016-2017-2 《Java程序设计》第六周学习总结
20155236 2016-2017-2 <Java程序设计>第六周学习总结 教材学习内容总结 InputStream与OutputStream 从应用程序角度来看,如果要将数据从来源取出 ...
- LOJ2316. 「NOIP2017」逛公园【DP】【最短路】【思维】
LINK 思路 因为我想到的根本不是网上的普遍做法 所以常数出奇的大,而且做法极其暴力 可以形容是带优化的大模拟 进入正题: 首先一个很显然的思路是如果在合法的路径网络里面存在零环是有无数组解的 然后 ...
- $.each()的用法
var obj = { one:1, two:2, three:3}; $.each(obj, function(key, val) { console.log(key);//one two thre ...