User Guide

Local Navigation

Creating buttons

You can create buttons that can cause an event to occur. For example, a user can click an item in a drop-down list, and click a button to send the information to the content server.

In the BlackBerry® Composer, buttons are complex objects that are made up of one or more objects. For example, a button might be made up of a rectangle and text. Buttons have four states. The Animation key editor displays a timeline for each button state. The states for buttons are identified by an icon ordered as follows, from left to right:

Button Description
Initial State: the initial appearance of the button
On Focus In: the button when it has focus
On Focus Out: the button when it does not have focus
On Activate: the button when the user clicks it

You can change the look and feel for each state. For example, you can use a brighter color for the On Focus In state to provide a visual highlight when the button has focus.

The timeline for each state is independent of the main project timeline, so you can animate or add actions to each state. For example, you might want to animate the button in the On Activate state to make the button appear to be pressed when the user clicks on it.

When you create a button, the workspace is in editing mode. Only the component objects that make up the button are visible on the canvas. In editing mode, you can access each of the button states on the Animation key editor.

Next topic: Create a button
Previous topic: Create a Pan effect

Was this information helpful? Send us your comments.