ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Animation functions / Animation of controls
  • Overview
  • How to?
  • Configuring the animation of controls at project level
  • Modifying the animation parameters for a specific control
  • Configuring the animation of controls programmatically
  • Animating a sequence of actions
  • Functions for managing animation of controls
  • Remark
  • Control animation properties
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
You have the ability to animate the controls found in a window.
This animation can be configured:
  • in the project options: You can set the animations of some operations on certain types of controls via the project options. The following elements can be animated:
    • scrolling through the rows of a Table or Looper control.
    • changes between months in a Calendar control,
    • the DDW feature (Dim Disabled Windows),
    • changes between planes,
    • changes between tabs,
    • control visibility changes,
    • size changes of Layout control cells.
    If an animation is defined for the project, it will also be used for all the corresponding controls in the project. In this case, the animations associated with the control can be modified for each control ("Style" tab of the control).
  • programmatically: Advanced animations used to manage the change of status for a control can be defined through programming. You have the ability to animate the appearance of controls in a window for example.
How to?

Configuring the animation of controls at project level

To configure the animation of controls:
  1. Open the project description window: on the "Project" tab, in the "Project" group, click "Description".
  2. In the "Advanced" tab, click "Animations of controls".
  3. In the window that appears:
    • Check "Enable animation of controls on the project" to apply the animations.
    • For each type of control, define the default animation used for the different events linked to the control. The duration of the animation can be configured for each event ("Parameters" button). The duration of an animation should not exceed 1 second.
  4. Validate.

Modifying the animation parameters for a specific control

By default, the animation of controls corresponds to the animation defined at project level. However, you have the ability to modify the animation for a window control.
To modify the animation of a control:
  1. Open the description window of the control to be modified (select "Description" in the context menu).
  2. In the "Style" tab, select the "Control animation" element.
  3. For each event that can be animated, choose (if necessary) the animation to perform as well as its parameters. The option "Defined by the project" allows you to use the animation options defined in the project description.
  4. Validate.
Configuring the animation of controls programmatically

Animating a sequence of actions

You have the ability to animate a sequence of actions performed on the controls. The principle is as follows:
  1. Using the AnimationPrepare function.
  2. Modifying the controls in the code (fill, move, change of plane, etc.). These modifications are not displayed. These modifications will be displayed when using AnimationPlay.
  3. Using the AnimationPlay function. This function is used to switch from the "before modification" status to the "after modification" status by playing an animation.

Functions for managing animation of controls

The functions are as follows:
AnimationEnabledEnables or disables the animations in the controls.
AnimationMinFPSConfigures the minimum number of images per second in order for the animations (transition effects) to be enabled in the controls.
AnimationPlayPlays an animation when a control, a group of controls or a window is modified.
AnimationPlayOnControlPropertyAnimates the modification of an integer property between 2 values.
AnimationPreparePrepares the animation on a control, a group of controls or a window.
Several functions are used to play an animation when the status of a control (or group of controls) changes:
ControlEnabledEnables a control or a group of controls in a window. An animation can be set on the controls during this operation.
ControlGrayedGrays a control or a group of controls. An animation can be set on the controls during this operation.
ControlInvisibleMakes a control (or a group of controls) invisible in a window. An animation can be set on the controls during this operation.
ControlVisibleMakes a control (or a group of controls) visible in a window. During this operation, an animation can be performed on the controls.

Remark

The animations of controls as well as AnimationPrepare and AnimationPlay have no effect when the window is being opened (i.e. when the window initialization code is executed), to prevent them from slowing down.

Control animation properties

The properties are as follows:
HeightWithAnimationThe HeightWithAnimation property is used to modify the height of a cell of a Layout control with the "Resize cell" animation defined:
  • in the "Advanced" tab of the project description window ("Control animation" button).
  • in the "Style" tab of the control or project.
VisibleWithAnimationThe VisibleWithAnimation property is used to make a control visible or invisible via the "Appear/Disappear" animation.
WidthWithAnimationThe WidthWithAnimation property is used to modify the width of a cell of a Layout control with the "Resize cell" animation defined:
  • in the "Advanced" tab of the project description window ("Control animation" button).
  • in the "Style" tab of the control or project.
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/14/2023

Send a report | Local help