Control - MoveTo Method

Animate a move from the specified number of pixels

Member of Control (PRIM_CTRL)


NameTypeData TypeDescription
Left*InputIntegerNumber of pixels to move to horizontally
Top*InputIntegerNumber of pixels to move to vertically
Duration*Input (Optional)IntegerNumber of milliseconds to take to complete the animation
Delay*Input (Optional)IntegerNumber of milliseconds to wait before starting the animation


The MoveFrom animation will move the control from the specified position back to its current location.
The Duration and Delay parameters are used change the speed of the animation and when it starts.


In this example, clicking the label will start the animation, moving the label to the bottom right corner.
A second animation then moves it back to the origin.
Begin_Com Role(*EXTENDS #PRIM_WEB) Height(456) Width(864)
   Define_Com Class(#PRIM_VS.Style) Name(#Style) Backgroundbrush(#Brush)
   Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush) Color(124:202:255)
   Define_Com Class(#PRIM_LABL) Name(#Label) Caption('Click here') Displayposition(1) Ellipses(Word) Height(99) Left(25) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(25) Verticalalignment(Center) Width(114) Style(#Style) Alignment(Center)
   Evtroutine Handling(#Label.Click)
      If (*Not #Label.isAnimating)
         #Label.MoveTo( (#Com_owner.Width - #Label.Width - 20) (#Com_owner.Height - #Label.height - 20) 2000 )
         #Label.MoveTo( 25 25 1000 2500 )

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2