stsProgBar

stsProgBar

Version 1.2.1
Sons of Thunder Software, Inc.
 

Description

The
stsProgBar
DropTool is an animated "indeterminate progress bar" control, sometimes called a "barber pole". It is used to show activity going on without knowing how many steps it will be or how long it will take.
 

Kind of DropTool

Behavior-based

 

Interface Support

Unless specifically stated, this control will function properly on all platforms, although its look-and-feel is intended for the platforms listed in the table to the left.
CustomCustom Mac OS XMac OS X WindowsWindows LinuxLinux iOSiOS AndroidAndroid
greencheck greencheck
 

Extra Features

greencheck "About" Stack  
greencheck "Inspector" Stack  
 

Screenshots

macpb

Mac OS X

maclionpb

Mac OS X (Lion)

winpb

Windows

 

Usage Notes

After dragging and dropping the stsProgBar control onto your stack, you can resize it horizontally to fit the width you need. It is suggested that you then reset and hide the control until you are ready, and then show and start the control playing. When the process is over, reset and hide it again.

An example of that might be something like this:

on preOpenCard
  hide grp "stsProgBar 1"
  send "stsProgBar_Reset" to grp "stsProgBar 1"
end preOpenCard

Then, when you're ready to display and run the progress bar:

command StartProgressBar
  show grp "stsProgBar 1"
  send "stsProgBar_Start" to grp "stsProgBar 1"
end StartProgressBar

Finally, when youre done:

command StopProgressBar
  send "stsProgBar_Stop" to grp "stsProgBar 1"
  hide grp "stsProgBar 1"
  send "stsProgBar_Reset" to grp "stsProgBar 1"
end StopProgressBar

The stsProgBar control is designed to run asynchronously, meaning that it won't stop any of your scripts from running or prevent the user from interacting with your stack.

 

The following tables show you how to interact with the DropTool from your scripts:

Custom Properties

Property Possible Values Notes
uPlaying "true" or "false" Indicates if the progress bar is currently playing (running) or not. Read-only.
 

Commands/Functions

These commands must be "sent" to the instance of the control for it to function. See an example of this in the Usage Notes section, above.

Command Parameters Notes
stsProgBar_Init (none) Resets the control to its original state, and adjusts the UI to correspond to the current platform.
stsProgBar_Start (none) Begins the animation of the progress bar based on the current platform. The playback is asynchronous, so you and/or the user can take additional actions while the progress bar is animating.
stsProgBar_Stop (none) Stops the animation of the progress bar based on the current platform.
 

Version History

Version Release Date What's Changed
1.2.1 09-17-2011 Fixed bug where progress bar stopped working on pre-Lion systems after having been assigned to a stack running under Lion.
1.2 07-21-2011 Added support for Mac OS X 10.7 (Lion).
1.1 06-04-2011 First public version.
 
© 2015 Sons of Thunder Software, Inc.