Transition Animation (PRIM_ANIM.Transition)

Animate the transition of two controls

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

Details

The Transition animation the change from one control to another.
 
When the animation completes, the control referenced in the To parameter will be visible.
 
For most requirements, the Transition method is a simpler solution.

Example

In this example, when a panel is clicked, it transition to an alternate panel and vice versa.
Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME<2015Green>) Height(528) Width(1049) Layoutmanager(#TableLayout1)
 
   Define_Com Class(#PRIM_VS.Style) Name(#Style1) Backgroundbrush(#Brush1)
   Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush1) Color(Theme100)
 
   Define_Com Class(#PRIM_VS.Style) Name(#Style2) Backgroundbrush(#Brush2)
   Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush2) Color(Theme500)
 
   Define_Com Class(#PRIM_TBLO) Name(#TableLayout1)
   Define_Com Class(#PRIM_TBLO.Column) Name(#Column1) Displayposition(1) Parent(#TableLayout1)
   Define_Com Class(#PRIM_TBLO.Row) Name(#Row1) Displayposition(1) Parent(#TableLayout1)
   Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem1) Column(#Column1) Manage(#Panel1) Parent(#TableLayout1) Row(#Row1)
   Define_Com Class(#PRIM_TBLO.Item) Name(#Panel2Item1) Column(#Column1) Manage(#Panel2) Parent(#TableLayout1) Row(#Row1)
 
   Define_Com Class(#prim_anim) Name(#Animation)
   Define_Com Class(#prim_anim.Transition) Name(#Item1) Parent(#Animation) Duration(250) Transitiontype(FadeFromLeft)
 
   Define_Com Class(#PRIM_PANL) Name(#Panel1) Displayposition(1) Height(528) Left(0) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(0) Width(1049) Style(#Style1)
   Define_Com Class(#PRIM_PANL) Name(#Panel2) Displayposition(2) Height(528) Left(0) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(0) Width(1049) Style(#Style2) Visible(False)
 
   Evtroutine Handling(#Panel1.Click #Panel2.Click) Com_Sender(#Sender)
 
      If (#Sender *IsEqualTo #Panel1)
 
         #Item1.From <= #Panel1
         #Item1.To <= #Panel2
 
      Else
 
         #Item1.From <= #Panel2
         #Item1.To <= #Panel1
 
      Endif
 
      #Animation.Start
 
   Endroutine
 
End_Com

Properties

NameDescription
ComponentClassNameComponentClassName is the name of the component's class. Inherited from Object (PRIM_OBJT)
ComponentMembersComponentMembers provides access to all the member components of this component Inherited from Object (PRIM_OBJT)
ComponentPatternNameComponentPatternName is used to qualify the class of the component. Inherited from Object (PRIM_OBJT)
ComponentTagGeneric space allowing a value to be stored for the instance Inherited from Object (PRIM_OBJT)
ComponentTypeComponentType gives you access to the type information about the component Inherited from Object (PRIM_OBJT)
ComponentTypeNameComponentTypeName is the fully qualified name of the component's class. Inherited from Object (PRIM_OBJT)
DurationNumber of milliseconds to take to complete the animation Inherited from Animation Item (PRIM_ANIM.AnimationItem)
FromControl to show at the start of the animation
NameName identifies the component Inherited from Object (PRIM_OBJT)
OwnerOwner owns this component Inherited from Object (PRIM_OBJT)
ParentReference to the animation of which this item is a part Inherited from Animation Item (PRIM_ANIM.AnimationItem)
StartTimeNumber of milliseconds to wait before starting the animation Inherited from Animation Item (PRIM_ANIM.AnimationItem)
ToControl to show when the animation ends
TransitionTypeThe type of transition

Events

NameDescription
CreateInstanceCreateInstance is signalled when an instance of a component is created Inherited from Transition Animation (PRIM_ANIM.Transition)
DestroyInstanceDestroyInstance is signalled when an instance of a component is about to be destroyed Inherited from Transition Animation (PRIM_ANIM.Transition)

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2