FMX.Ani.TColorAnimation
Delphi
TColorAnimation = class(TCustomPropertyAnimation)
C++
class PASCALIMPLEMENTATION TColorAnimation : public TCustomPropertyAnimation
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | FMX.Ani.pas FMX.Ani.hpp |
FMX.Ani | FMX.Ani |
Description
Attached to a property of type TColor of an object to change its value over time.
Attach a TColorAnimation to a TFmxObject parent object in one of these ways:
- Select the parent object and then double-click a TColorAnimation in the Tool Palette. Then set the PropertyName to the name of the property in the parent object to animate.
- In the Object Inspector for the parent object, double-click the film strip icon next to the property to animate. This will assign the PropertyName for you.
- Create a TColorAnimation instance dynamically and assign the parent object as the parent. Then set the PropertyName.
Assign the StopValue property in TColorAnimation to the value you want to animate to. Set the Duration property to the number of seconds the animation should persist. Set StartValue and the StartFromCurrent to False if you want the animation to start with some value other than the property's current value. Use the Loop property to repeat the animation over and over. Use the Start and Stop methods to start and stop, or set the Enabled property in the Object Inspector for the TColorAnimation to start at run time. Set AnimationType and the Interpolation to control the rate of change of the animation.
See Also
- FireMonkey Animation Effects
- FMX.Types.TFmxObject
- FMX.Ani.TCustomPropertyAnimation.PropertyName
- FMX.Ani.TColorAnimation.StartValue
- FMX.Ani.TColorAnimation.StopValue
- FMX.Ani.TColorAnimation.StartFromCurrent
- FMX.Ani.TAnimation.Loop
- FMX.Ani.TAnimation.Start
- FMX.Ani.TAnimation.Stop
- FMX.Ani.TAnimation.Enabled
- FMX.Ani.TAnimation.AnimationType
- FMX.Ani.TAnimation.Interpolation
Code Examples
- FireMonkey HD Animation sample
- FireMonkey Object Animate Color (Delphi)