Prepares the animation on a control, a group of controls or a window. Then, the animation will be played by AnimationPlay
The principle is as follows:
- Using AnimationPrepare.
- Modify the controls in the code (fill, move, change of plane, etc.). These modifications are not displayed. These modifications will be displayed when using AnimationPlay.
- AnimationPlay function. This function is used to switch from the "before modification" status to the "after modification" status by playing an animation.
// Prepare the animation
// The animation will be played in the window
AnimationPrepare(WIN_Customer, WIN_Customer.X, WIN_Customer.Y, ...
// Modify controls
BTN_Down.Visible = False
IMG_Detail.Height += 50
// Performs the modifications and plays the animation
AnimationPrepare(<Element> [, <X> , <Y> , <Width> , <Height>])
<Element>: Character string
Name of the control or window where the animation will be performed.
<X>: Optional integer
X-coordinate (in pixels) of the top left corner of the rectangle where the animation will be performed.
<Y>: Optional integer
Y-coordinate (in pixels) of the top left corner of the rectangle where the animation will be performed.
<Width>: Optional integer
Width (in pixels) of the rectangle where the animation will be performed.
<Height>: Optional integer
Height (in pixels) of the rectangle where the animation will be performed.
- An error occurs if AnimationPrepare is called twice without a call to AnimationPlay.
- To avoid slowing down the window opening process, AnimationPrepare and AnimationPlay have no effect when they are used in the "Initializing" event of the window.
- AnimationPrepare and AnimationPlay have no effect:
- if "Enable the animation of controls on the project" is not checked. This option is available in the description window of the project, "Advanced" tab, "Animation of controls" button.
- if AnimationEnabled has not been called to enable the animations.
Business / UI classification: UI Code