Style Animation (PRIM_ANIM.Style)

Animates a change of style

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

Details

The Style animation changes the Style of the managed control.
 
When the animation completes, the control Style will be the same as the Style specified.

Example

In this example, when the mouse enters one of the labels the style is swapped with the other available style.
Begin_Com Role(*EXTENDS #PRIM_WEB)
 
   Define_Com Class(#PRIM_VS.Style) Name(#Style1) Backgroundbrush(#Brush1)
   Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush1) Color(255:123:17)
 
   Define_Com Class(#PRIM_VS.Style) Name(#Style2) Backgroundbrush(#Brush2)
   Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush2) Color(85:131:255)
 
   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(#Style1)
   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(#Style1)
   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(#Style1)
 
   Define_Com Class(#prim_anim) Name(#Animation)
   Define_Com Class(#prim_anim.Style) Name(#Animation1) Parent(#Animation) Duration(250) Style(#Style2)
 
   Evtroutine Handling(#Label1.MouseEnter #Label2.MouseEnter #Label3.MouseEnter) Com_Sender(#Sender)
 
      If (#Sender.Style *IsEqualTo #Style1)
 
         #Animation1.Style <= #Style2
 
      Else
 
         #Animation1.Style <= #Style1
 
      Endif
 
      #Animation1.Control <= #Sender
 
      #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)
ControlReference to the control whose style will be modified
DurationNumber of milliseconds to take to complete the animation Inherited from Animation Item (PRIM_ANIM.AnimationItem)
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)
StyleReference to a style to be applied

Events

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

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2