Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetDelphiDemoFiremonkeyIOSOSXWindows

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

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi XE7 Firemonkey Cross Platform Long Touch Event | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSDeveloper 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.

Related posts
DelphiDemoFiremonkeyLinuxOSXShowcaseWindows

AutoBlogAI: FireMonkey Client To Leverage LLMs And Generative AI For Blogging

DelphiFiremonkeyShowcaseUtilityWindows

Unleashing Creativity With Song Writer AI: A Deep Dive

DelphiFiremonkeyShowcaseWindows

How To Build Stable Diffusion Text To Image Prompts

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

Sign up for our Newsletter and
stay informed

1 Comment

Leave a Reply