Control - MoveFrom Method

Move a control from the specified position to the current position

Member of Control (PRIM_CTRL)

Parameters

NameTypeData TypeDescription
Left*InputIntegerHorizontal position to move from
Top*InputIntegerVertical position to move from
Duration*Input (Optional)IntegerNumber of milliseconds to take to complete the animation
Delay*Input (Optional)IntegerNumber of milliseconds to wait before starting the animation

Details

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.

Example

In this example, clicking the label will start the animation, moving the label from the bottom right corner back to its start point.
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(23) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(14) Verticalalignment(Center) Width(114) Style(#Style) Alignment(Center)
 
   Evtroutine Handling(#Label.Click)
 
      If (*Not #Label.isAnimating)
 
         #Label.MoveFrom( (#Com_owner.Width - #Label.Width - 20) (#Com_owner.Height - #Label.height - 20) 2000 )
 
      Endif
 
   Endroutine
 
End_Com

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020