Visibility Animation (PRIM_ANIM.Visibility)

Animate the visibility of a control

Ancestors - Animation Item (PRIM_ANIM.AnimationItem)Object (PRIM_OBJT)


The Visbility animation changes the Visibility of the managed control.
When the animation completes the control Visible property will be the same as the Visibility specified.
For most requirements, the FadeIn and FadeOut methods are a simpler solution.


In this example, when the button is clicked, the label fades in and out.
Begin_Com Role(*EXTENDS #PRIM_web) Height(388) Width(592) Theme(#SYS_THEME<2015Orange>)
   Define_Com Class(#PRIM_VS.Style) Name(#Style1) Backgroundbrush(#Brush1) Cursor(Hand)
   Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush1) Color(Theme500)
   Define_Com Class(#PRIM_VS.Style) Name(#Style2) Backgroundbrush(#Brush2)
   Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush2) Color(Theme100)
   Define_Com Class(#PRIM_LABL) Name(#Label) Displayposition(2) Ellipses(Word) Height(141) Left(32) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(24) Verticalalignment(Center) Width(184) Alignment(Center) Style(#Style2)
   Define_Com Class(#PRIM_PHBN) Name(#Button) Caption('Click') Displayposition(1) Left(32) Parent(#COM_OWNER) Tabposition(1) Top(184)
   Define_Com Class(#prim_anim) Name(#Animation)
   Define_Com Class(#prim_anim.Visibility) Name(#Animation1) Parent(#Animation) Manage(#Label) Duration(500)
   Evtroutine Handling(#Button.Click)
      #Animation1.Visible := *Not #Label.Visible


Name Description
ComponentClassName ComponentClassName is the name of the component's class. Inherited from Object (PRIM_OBJT)
ComponentMembers ComponentMembers provides access to all the member components of this component Inherited from Object (PRIM_OBJT)
ComponentPatternName ComponentPatternName is used to qualify the class of the component. Inherited from Object (PRIM_OBJT)
ComponentTag Generic space allowing a value to be stored for the instance Inherited from Object (PRIM_OBJT)
ComponentType ComponentType gives you access to the type information about the component Inherited from Object (PRIM_OBJT)
ComponentTypeName ComponentTypeName is the fully qualified name of the component's class. Inherited from Object (PRIM_OBJT)
Duration Number of milliseconds to take to complete the animation Inherited from Animation Item (PRIM_ANIM.AnimationItem)
Manage Reference to the control affected by the animation
Name Name identifies the component Inherited from Object (PRIM_OBJT)
Owner Owner owns this component Inherited from Object (PRIM_OBJT)
Parent Reference to the animation of which this item is a part Inherited from Animation Item (PRIM_ANIM.AnimationItem)
StartTime Number of milliseconds to wait before starting the animation Inherited from Animation Item (PRIM_ANIM.AnimationItem)
Visible Visibility of the control when the animation completes


Name Description
CreateInstance CreateInstance is signalled when an instance of a component is created Inherited from Visibility Animation (PRIM_ANIM.Visibility)
DestroyInstance DestroyInstance is signalled when an instance of a component is about to be destroyed Inherited from Visibility Animation (PRIM_ANIM.Visibility)

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020