The following tasks are associated with using an
IAnimatedButton* part in visual composition. Tasks that are
common to many parts are described in related topics.
-
- Assigning animation bitmaps
- To assign animation bitmaps to the button, set the resourceIds
property in the IAnimatedButton* property sheet. In the
Resource Ids prompter property window, you can do either
of the following:
- Select a bitmap identifier, such as the play
identifier, from the Identifier list
field.
- Specify a starting bitmap resource and bitmap
count by setting the following fields:
- Dll name to identify the DLL
containing the bitmaps
- Id to identify the ID of the
starting bitmap
- Bitmap count to indicate the
number of bitmaps in the series
- Setting an animation rate
- To determine the animation rate for the graphic sequence
on the button, set the animationRate field in the
IAnimatedButton* property sheet. Specify how long you
want each bitmap displayed, in thousandths of a second.
- Enabling button latching
- A latchable button appears to remain pushed down when it
is selected, and returns to the unpushed state when it is
deselected. To enable latching for the button, open the style
property in the IAnimatedButton* property sheet and set
the latchable style to on.
- Enabling automatic latching for a group of buttons
- If you define a set of animated buttons as a control
group, you can enable automatic latching for the buttons.
Then, when one button in the group is selected and
latched, the currently latched button in the group is
unlatched. To enable automatic latching for each button,
open the style property in its property sheet and
set the autoLatch style to on.
- Starting and stopping animation
- To automatically show animation while the button is
latched down, open the style property in the
IAnimatedButton* property sheet and set the animateWhenLatched
style to on.
To start animation when an event
occurs, connect the event to the IAnimatedButton* startAnimation
action.
To stop animation when an event occurs, do either of
the following:
- Connect the event to the IAnimatedButton* stopAnimation
action
- Connect the event to the IAnimatedButton* startAnimation
action and provide a parameter value of false
- Calling an action from a button
- To start the action represented by the button, connect
the IAnimatedButton* buttonClickEvent feature to
the action on the target part. For example, to start the play
action of an IMMAudioCD* part, connect the
IAnimatedButton* buttonClickEvent feature to the
IMMAudioCD* play action.
Common Tasks for Control Parts
Setting Part Style Properties
Setting Part Color Properties
Setting Part Font Properties
Setting Part Handlers
Properties
Setting Part Framing Properties
Working with VisualAge User
Interface Parts
IAnimatedButton
Property Settings --
IAnimatedButton
Portability --
IAnimatedButton