Animate the transition of two controls
Ancestors - Animation Item (PRIM_ANIM.AnimationItem) Object (PRIM_OBJT)
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.
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
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) |
From | Control to show at the start of 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) |
To | Control to show when the animation ends |
TransitionType | The type of transition |
Name | Description |
---|---|
CreateInstance | CreateInstance is signalled when an instance of a component is created Inherited from Transition Animation (PRIM_ANIM.Transition) |
DestroyInstance | DestroyInstance is signalled when an instance of a component is about to be destroyed Inherited from Transition Animation (PRIM_ANIM.Transition) |
Febuary 18 V14SP2