Book Image

Delphi Cookbook

By : Daniele Teti
Book Image

Delphi Cookbook

By: Daniele Teti

Overview of this book

Table of Contents (14 chapters)
Delphi Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Impressing your clients with animations


Animations are a nice thing. A well-done animation, not too intrusive and with good visual information, can explain what is happening on the UI better than 1,000 words. In this recipe, you'll implement a dual list with the include<>exclude paradigm so that what is removed from one list is included in the other list and vice versa. You'll use FireMonkey animations.

FireMonkey animations are really simple to use. Some kinds of property types can be animated. Some of these types are color, bitmap, gradient, and floating point number. The most used animation engine is the TFloatAnimation. This is used to animate floating point values such as Opacity, Position.X, Position.Y, Width, Height, and many more.

How to do it…

What you want to create is shown in the following screenshot:

The dual list selection form

There are three images in the left-hand side gray list and zero images in the red list on the right-hand side. Clicking on an image; the clicked image...