You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Control - MoveFrom Method
Move a control from the specified position to the current position
Member of Control (PRIM_CTRL)

Parameters

Name

Type

Data Type

Description

Left

*Input

Integer

Horizontal position to move from

Top

*Input

Integer

Vertical position to move from

Duration

*Input (Optional)

Integer

Number of milliseconds to take to complete the animation

Delay

*Input (Optional)

Integer

Number 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

  • No labels