Skip to content

TStyledAnimatedTaskDialog - Technical Reference ​

Overview ​

TStyledAnimatedTaskDialog is a TStyledTaskDialog delivered with the Skia4Delphi animated form: the icons of the dialog are Lottie animations. See the TStyledAnimatedTaskDialog page for the description and the examples.

Class Hierarchy ​

TComponent
  └─ TCustomTaskDialog
      └─ TTaskDialog
          └─ TStyledTaskDialog
              └─ TStyledAnimatedTaskDialog

Units ​

UnitContent
Vcl.StyledAnimatedTaskDialogTStyledAnimatedTaskDialog. Its implementation uses Skia.Vcl.StyledTaskDialogAnimatedUnit, so the animated form is linked and registered
Skia.Vcl.StyledTaskDialogAnimatedUnitTStyledTaskDialogAnimatedForm, the resources Animations.RES ({$R Animations.RES}), registration in initialization

Packages: StyledAnimatedComponents (runtime, requires StyledComponents, Skia.Package.VCL, Skia.Package.RTL) and dclStyledAnimatedComponents (design-time). Palette page: Styled Animated Components.

Members of TStyledAnimatedTaskDialog ​

The class declares no new properties, methods or events (empty body). Everything comes from TStyledTaskDialog; the ones that control the animations are:

PropertyTypeDefaultDescription
UseAnimationsBooleanFalseShows the dialog with the animated form. Raises EStyledTaskDialogException if no animated form is registered (the unit Skia.Vcl.StyledTaskDialogAnimatedUnit is not in the project)
UseAnimationLoopBooleanFalseLoops the animation of the icon (turning it on sets UseAnimations)
UseAnimationInverseBooleanFalsePlays the animation in reverse (turning it on sets UseAnimations)
MainIconTTaskDialogIcontdiInformationSelects the animation: tdiNone (Custom), tdiWarning, tdiError, tdiInformation, tdiShield, tdiQuestion
FooterIconTTaskDialogIcontdiNoneSelects the animation of the footer
MainIconSizeInteger64Size of the animated icon

For all the other members (buttons, texts, AutoClick, DialogButtonsFamily, events...) see the TStyledTaskDialog Reference.

TStyledTaskDialogAnimatedForm (unit Skia.Vcl.StyledTaskDialogAnimatedUnit) ​

Descendant of TStyledTaskDialogForm.

MemberVisibilityDescription
SkAnimatedImage: TSkAnimatedImagepublished fieldAnimation of the main icon
SkFooterAnimatedImage: TSkAnimatedImagepublished fieldAnimation of the footer icon
class function CanUseAnimations: Booleanprotected, overrideReturns True: the class is registered as the animated form
procedure LoadImage(AImageIndex; AImageName)protected, overrideLoads the Lottie resource of the main icon
procedure LoadCustomMainIcon(AIcon; ATaskDialogIcon)protected, overrideA custom icon is ignored: the animation of ATaskDialogIcon is loaded
procedure LoadCustomFooterIcon(AIcon; ATaskDialogIcon)protected, overrideLoads the animation of the footer icon (a custom icon is not animated)
AnimationLoop, AnimationInversepublic (inherited)Copied from UseAnimationLoop / UseAnimationInverse of the dialog

Lottie resources ​

Linked from Animations.RES (source source\Animations.rc, built with source\BuildResFileOfAnimations.cmd), type RCDATA, name STYLEDTASKLOTTIE_ + icon name:

ResourceUsed for
STYLEDTASKLOTTIE_INFORMATIONtdiInformation
STYLEDTASKLOTTIE_WARNINGtdiWarning
STYLEDTASKLOTTIE_ERRORtdiError
STYLEDTASKLOTTIE_QUESTIONtdiQuestion (and mtConfirmation dialogs)
STYLEDTASKLOTTIE_SHIELDtdiShield
STYLEDTASKLOTTIE_CUSTOMtdiNone
STYLEDTASKLOTTIE_NOTIFYnot mapped to an icon; used by the demo animated buttons

Registration routines (unit Vcl.StyledTaskDialogFormUnit) ​

RegisterTaskDialogFormClass(TStyledTaskDialogAnimatedForm) (done by the unit initialization), UnRegisterTaskDialogFormClass, AnimatedTaskDialogFormRegistered: Boolean, and the global InitializeStyledTaskDialogs(AUseAnimations: Boolean) that switches the animated dialogs on or off for the message routines. See the TStyledTaskDialog Reference.

See Also ​

Released under Apache License, Version 2.0.