Use A Cross Platform Long Tap Event In Delphi XE7 Firemonkey On Android, IOS, OSX, And Windows

Delphi XE7 Firemonkey Cross Platform Long Touch EventDeveloper SangHyun Oh has a blog post up where he demonstrates how to implement your own long tap event in Delphi XE7 Firemonkey. Basically the solution is to use a timer to count the time between the mouse down event and the mouse up event. If it is longer than 0.8 seconds then it counts as a long tap. The reason why I think this is great is because it works across all platforms that Firemonkey supports which are Windows, IOS, OSX, and Android. Firemonkey does actually have a long tap event but it is more complex to implement as it requires the use of the TGestureManager and the OnGesture event. I’ve used some other cross platform frameworks that don’t differentiate between mouse events and tap events. A long mouse click and a long mouse tap are handled the same with the same event. Using the timer like SangHyun demonstrates allows you to do this. It also allows you to debug, test, and use your long tap events on Windows and OSX normally. You can use this with Appmethod as well.

Head over and download the full demo project of implementing your own long tap event cross platform with Delphi XE7 Firemonkey.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Use A Cross Platform Long Tap Event In Delphi XE7 Firemonkey On Android, IOS, OSX, And Windows by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Delphi XE7 IOS Apps In Object Pascal Without Firemonkey Framework
Build An IOS App Without Firemonkey In Object Pascal With Delphi XE7

Developer Simon,Choi has released an IOS app project in Object Pascal for Delphi XE7 that does not use the Firemonkey...

Close