|
|
|
|
|
- Overview
- How to?
- Configuring window animations at project level
- Configuring window animations at window level
- Configuring window animations programmatically
- Automation feature: Disable animation
Animating the windows of a WINDEV application
To give your applications a playful touch, or to pleasantly surprise a user on launch, windows can be animated on opening and/or closing: a window can open by rotating, by coming from the background of the screen, ... (rather like video editing effects). The effect can be fixed or chosen at random. This feature can be defined in the options of the project, in the window description or programmatically. If a window loads several elements, an "animation" (performed independently of the current processes) allows the users to wait for the window to be ready! This feature must be used sparingly to avoid annoying the users. You can for example animate the first window of your application or limit this animation to a specific number of windows. Note The windows context menu (AAF) allows the user to delete window animations at any time ("Disable window animations" option). For more details, see Automation feature: Disable animation. Configuring window animations at project level To configure window animations at project level: - Open the project description window. To do so, go to the "Project" tab, "Project" group, and click "Description".
- On the "Advanced" tab, click "Window animations".
- The window that is displayed allows you to configure the animation:
- of the first project window.
- all the project windows.
To configure the animation of the first project window: - Choose the animation to perform (opening or closing) and click the "None" link.
- In the window that appears, check "Enable animation" and select the animation parameters:
- Duration of animation (in hundredths of a second).
- Type of the animation (if the random mode is chosen, the animation will be automatically selected by the application whenever the window is opened).
- The "Preview" button allows you to view the selected parameters.
- You can also apply the selected animation to the current window (check "Animate this description window").
- Validate.
Note: A window must of course be defined as the "First window of the project". To configure the animation of all project windows: - Choose the animation to perform (opening or closing) and click the "None" link.
- In the window that appears, check "Enable animation" and select the animation parameters:
- Duration of animation (in hundredths of a second).
- Type of the animation (if the random mode is chosen, the animation will be automatically selected by the application whenever the window is opened).
- The "Preview" button allows you to view the selected parameters.
- You can also apply the selected animation to the current window (check "Animate this description window").
- Validate.
- Specify the animation frequency:
- Toujours: animation will always be performed on each application window.
- Often: the animation will occur about once in every ten times a window is opened/closed.
- Rarely: the animation will take place approximately every time one window in thirty is opened/closed.
- Custom frequency.
Note: This setting is only taken into account for windows that are not individually set.. For example: - if the opening animation defined for all the project windows corresponds to "None" and if an opening animation was configured for the "WIN_Customer" window, this animation will be performed when opening the "WIN_Customer" window.
- if the opening animation defined for all the project windows corresponds to "Custom" and if an opening animation was configured for the "WIN_Customer" window, the animation defined for the "WIN_Customer" window will be performed when this window is opened.
Configuring window animations at window level To configure window animations at window level: - Open the window to animate in the window editor.
- Open the window description (select "Description" in the context menu).
- On the "Details" tab, choose the type of animation to perform (opening or closing) and click the "None" link.
- In the window that appears, check "Enable animation" and select the animation parameters:
- Duration of animation (in hundredths of a second).
- Type of the animation (if the random mode is chosen, the animation will be automatically selected by the application whenever the window is opened).
- The "Preview" button allows you to view the selected parameters.
- You can also apply the selected animation to the current window (check "Animate this description window").
- Validate.
Note: This setting is taken into account for the current window, even if a different setting is specified at project level. Configuring window animations programmatically Several WLanguage functions are used to configure window animations:
| | WinAnimationClosing | Modifies the type and duration of the animation used when closing the application windows. | WinAnimationNext | Modifies the type and duration of animations used when opening and closing the next window. | WinAnimationOpening | Modifies the type and duration of animations used when opening the application windows. |
These functions can be applied to the windows for which no animation was configured otherwise (from the project editor or from the window editor for example). WinDisableEffect is used to disable window animations (on a TSE computer with low bandwidth for example). Automation feature: Disable animation The user can disable window animations at any time, via the option "Disable window animations" in the window context menu. This option prevents the use of window animations on all the windows of the project. To avoid proposing this option in the context menu of windows, you can: - disable the option for all the project windows:
- On the "Project" tab, in the "Project" group, click "Description". The project description window appears.
- On the "Advanced" tab, click "AAF menu".
- Select the "Window" element and uncheck "Disable window animations".
- disable the option when necessary, through programming with AAFDisable associated with the aafDisableWindowAnimation constant.
Related Examples:
|
Unit examples (WINDEV): Animation when opening and closing the windows
[ + ] Using window animations (opening or closing). You also have the ability to see the available animations. You have the ability to modify the different parameters such as the duration of the animation for example.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|