Animate a change of scale
Ancestors - Animation Item (PRIM_ANIM.AnimationItem) Object (PRIM_OBJT)
The Scale animation changes the ScaleHeight and ScaleWidth of the managed control. When the animation completes the control ScaleHeight and ScaleWidth will be the same as the ScaleHeight and ScaleWidth specified. For most requirements, the Scale method is a simpler solution.
In this example, when the mouse enters any of the labels, it is attached to the animation items and the animation is started. The first part of the animation makes the label larger and the second item returns it to the original size after a 100 millisecond delay. The effect is that the label jumps when the mouse enters its bounds.
Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME<2015Indigo>) Define_Com Class(#PRIM_VS.Style) Name(#Style2) Backgroundbrush(#Brush2) Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush2) Color(Theme400) Define_Com Class(#PRIM_LABL) Name(#Label1) Displayposition(3) Ellipses(Word) Height(65) Left(64) Parent(#COM_OWNER) Tabposition(3) Tabstop(False) Top(72) Verticalalignment(Center) Width(105) Alignment(Center) Style(#Style2) Define_Com Class(#PRIM_LABL) Name(#Label2) Displayposition(2) Ellipses(Word) Height(65) Left(288) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(72) Verticalalignment(Center) Width(105) Alignment(Center) Style(#Style2) Define_Com Class(#PRIM_LABL) Name(#Label3) Displayposition(1) Ellipses(Word) Height(65) Left(176) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(72) Verticalalignment(Center) Width(105) Alignment(Center) Style(#Style2) Define_Com Class(#prim_anim) Name(#Animation) Define_Com Class(#prim_anim.Scale) Name(#Animation1) Parent(#Animation) Scaleheight(110) Scalewidth(110) Duration(100) Define_Com Class(#prim_anim.Scale) Name(#Animation2) Parent(#Animation) Starttime(100) Duration(100) Evtroutine Handling(#Label1.MouseEnter #Label2.MouseEnter #Label3.MouseEnter) Com_Sender(#Sender) #Animation1.Manage #Animation2.Manage <= #Sender #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) |
Manage | Reference to the control affected by the animation |
Name | Name identifies the component Inherited from Object (PRIM_OBJT) |
OriginLeft | Horizontal point within the control from which the control will scale |
OriginTop | Vertical point within the control from which the control will scale |
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) |
ScaleHeight | Percentage height of the control when the animation ends |
ScaleWidth | Percentage width of the control when the animation ends |
StartTime | Number of milliseconds to wait before starting the animation Inherited from Animation Item (PRIM_ANIM.AnimationItem) |
Name | Description |
---|---|
CreateInstance | CreateInstance is signalled when an instance of a component is created Inherited from Animation Item (PRIM_ANIM.AnimationItem) |
DestroyInstance | DestroyInstance is signalled when an instance of a component is about to be destroyed Inherited from Animation Item (PRIM_ANIM.AnimationItem) |
Febuary 18 V14SP2