CloseAnimation
property for PowerScript controls
Applies to
Window controls
Description
Specifies an optional animation effect that displays when the window
closes.
Usage
The CloseAnimation property takes a value of the
WindowAnimationStyle enumerated variable. For “slide” values, the whole
window appears to slide from the direction selected. For “roll” values,
the window does not move but its display is cleared from the direction
selected. Values are:
-
NoAnimation! (default) — The window closes with no
animation. -
TopSlide! — The window slides from the top to the bottom of its
extent. -
BottomSlide! — The window slides from the bottom to the top of
its extent. -
LeftSlide! — The window slides from the left to the right of
its extent. -
RightSlide! — The window slides from the right to the left of
its extent. -
TopRoll! — The window rolls from the top to the bottom of its
extent. -
BottomRoll! — The window rolls from the bottom to the top of
its extent. -
LeftRoll! — The window rolls from the left to the right of its
extent. -
RightRoll! — The window rolls from the right to the left of its
extent. -
FadeAnimation! — The window fades out.
-
CenterAnimation! — The window collapses from the center.
You can modify the animation properties at any time and use them for
any window type. They are most often used in pop-up windows.
FadeAnimation! can be used only in top-level windows. It does not
work in child windows. In MDI applications, you cannot use FadeAnimation!
for sheet windows. Fading affects the transparency of the window, and
sheet windows in MDI applications always inherit the transparency of the
frame window.
Also, if the Transparency property of a frame or main window is set
to a value above 0, the TopRoll!, BottomRoll!, LeftRoll!, RightRoll!, and
CenterAnimation! settings do not work with sheet windows or child windows.
All settings work correctly for frame windows.
While the animation executes, the application waits for it to
complete. Use the AnimationTime property to control the number of
milliseconds the animation takes to execute.
The window’s CloseQuery event is triggered before the animation
begins. The Close event is triggered when the animation has
completed.
In a painter
To set the CloseAnimation property on a window:
-
Select a value from the CloseAnimation drop-down list on the
General page of the window’s Properties view.
In scripts
The following example sets the CloseAnimation property of the
w_splash window to FadeAnimation!:
1 |
w_splash.CloseAnimation = FadeAnimation! |
See also