Workbench User Guide : 9. Generating Fields from Predefined Templates : How You Can Add a Generated Field to a Frame : The stopwatch_control Field Template
 
Share this page                  
The stopwatch_control Field Template
The stop_watch field template creates a stopwatch that shows the length of time since the timer's activation. The timer is updated at predetermined intervals. The display format is hours and minutes by default, but you can also display seconds.
Create a Stop Watch Field
You can create a stopwatch field using the stopwatch_field template in the Frame Editor.
To create a stopwatch field
1. On the Develop tab, in the Components portlet, open the frame in which you want to create the field from the field template.
2. Click Insert, Field From Field Template.
The Select a Field Template dialog appears.
3. Select the core application and the stop_watch template, and then click OK.
4. Position the field on the frame.
The Stop Watch Assistant appears.
5. Complete the dialog using the following information:
Timer Update Interval (in seconds)
Specifies the amount of time (in seconds) after which the stopwatch display is updated
Display Seconds
Specifies that seconds are displayed in the stopwatch field
6. Click Generate.
The field is created and displayed on the form.
How a Stop Watch Field Works
When the frame containing the stopwatch field is executed, the field appears containing a default value of 00:00. For example, the default values in the Stop Watch Assistant dialog produce the following:
To start the stopwatch, click Go. The button display then reads “Stop.” The time display is updated at the specified intervals. To stop the stopwatch, click Stop.