wxAnimationCtrl
generated from ../src/mod_gui/control/animctrl.cppThis is a static control which displays an animation. See also wxAnimation
Constants
Styles
| Name | Description |
|---|---|
| DEFAULT_STYLE | |
| NO_AUTORESIZE | By default, the control will adjust its size to exactly fit to the size of the animation when animation is set. If this style flag is given, the control will not change its size. |
Constructor
wxAnimationCtrl
wxAnimationCtrl()
wxAnimationCtrl(Parent,
Id,
Animation,
Pos = wxDefaultPosition,
Size = wxDefaultSize,
Style = 0)
| Name | Type | Default | Description |
|---|---|---|---|
| Parent | wxWindow | The parent of the checkbox | |
| Id | Integer | A window identifier. Use -1 when you don't need it | |
| Animation | wxAnimation | The label of the checkbox | |
| Pos | wxPoint | wxDefaultPosition | The position of the checkbox on the given parent |
| Size | wxSize | wxDefaultSize | The size of the checkbox |
| Style | Integer | 0 | The style of the checkbox |
Constructs a new wxAnimationCtrl object.
Properties
| Name | Type | Description |
|---|---|---|
| animation | wxAnimation | Get/Set the animation associated with this control. |
| inactiveBitMap | wxBitmap | The bitmap to show on the control when it's not playing an animation. If you set it to null (which is the default), then the first frame of the animation is instead shown when the control is inactive; in this case, if there's no valid animation associated with the control (see animation), then the background colour of the window is shown. |
playing ![]() |
Boolean | Returns true if the animation is being played. |
Methods
create
create(Parent,
Id,
Animation,
Pos = wxDefaultPosition,
Size = wxDefaultSize,
Style = 0) : Boolean
| Name | Type | Default | Description |
|---|---|---|---|
| Parent | wxWindow | The parent of the checkbox | |
| Id | Integer | A window identifier. Use -1 when you don't need it | |
| Animation | wxAnimation | The animation | |
| Pos | wxPoint | wxDefaultPosition | The position of the animation control on the given parent. |
| Size | wxSize | wxDefaultSize | The size of the animation control |
| Style | Integer | 0 | The style of the animation control |
Constructs a new wxAnimationCtrl object.
loadFile
loadFile(Name,
Type = wxAnimation.TYPE_ANY)
| Name | Type | Default | Description |
|---|---|---|---|
| Name | String | Filename | |
| Type | Integer | wxAnimation.TYPE_ANY |
Loads an animation from a file.
play
play() : Boolean
Starts playing the animation. The animation is always played in loop mode (unless the last frame of the animation has an infinite delay time) and always start from the first frame (even if you stopped it while some other frame was displayed).
stop
stop()
Stops playing the animation. The control will show the first frame of the animation, a custom static image or the window's background colour as specified by setting inactiveBitmap.

© 2002 - 2007 Franky Braem.