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

AndroidAppmethodCode SnippetDelphiFiremonkeyIOSOSXWindows

Create Floating Animation With TAnimateFloat In Delphi Firemonkey

Floating Panel Animation Delphi FiremonkeyRad Studio XE2 introduced FireMonkey animation effects. A list of these effects, their description, methods, properties, and events can be found here. For each animation effect, Embarcadero also provides code examples. For example, for the TFloatAnimation effect, Embarcadero has provided five different examples at the bottom of the page. The simplest of the demos demonstrates how to make a rectangle fade from its original color state to transparent. This should work cross platform on Android, IOS, OSX, and Windows.

However, below I have provided a simple demo of using the TAnimateFloat effect as well.  Unlike Embarcadero’s examples, this demo utilizes TFloatAnimation at runtime to make a “Hello World” Splash screen from a TPanel.

Start by creating two controls (pnl: TPanel & lbl: TLabel) in the main form’s class.

Add the following code to the form’s OnActivate and OnCreate events.

In order to make the Panel reverse directions and go the other way, we will add an OnClick event for the TPanel created at runtime.

Head over and see the other properties of TAnimateFloat.

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

Related posts
AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Powerful Cross Platform Email App Sample In Delphi 10.4.1 FireMonkey For Android And IOS


Significant Update Available For Delphi FireMonkey 10.4.1 On Android, IOS, OSX, Windows, And Linux


Professional SVG Icon Image List For Delphi 10.4 FireMonkey On Windows


Top Tips And Tricks To Speed Up Development With Delphi 10.4 FireMonkey On Android and IOS

Sign up for our Newsletter and
stay informed

Leave a Reply