HyperWorks Tools

::hwat::widgets::spinner::Spinner

::hwat::widgets::spinner::Spinner

Previous topic Next topic No expanding text in this topic  

::hwat::widgets::spinner::Spinner

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

NAME

::hwat::widgets::spinner::Spinner - Allows you to create a basic spinner widget and place in the GUI.  This widget has a pair of arrow buttons, which you can click to increment or decrement a value.

 

SYNTAX

::hwat::widgets::spinner::Spinner frameName label spinnerVar

 

ARGUMENTS

frameName

Name of the parent frame where to embed a spinner.

Label

Spinner label.

spinnerVar

Global variable associated with the spinner.

str_callback

User’s callback which accepts only one argument: spinner value, i.e. translation value.

[ n_width ]

Entry field width ( optional, default is 5 ).

[ n_incr ]

Increment value ( optional, default is 1 ).

 

 

Returns

A variable associated with the spinner frame for packing purposes.

 

Example

pack [ ::hwat::widgets::::spinner::Spinner .top "My label" ::hwat::gui::utils::myvar "::hwat::utils::RepositionDummy"] –side top –anchor nw

or

set str_fr [ ::hwat::widgets::::spinner::Spinner .top "My llabel" myvar "::hwat::utils::RepositionDummy" 10 0.5 ]

pack $ str_fr - side top –anchor nw

 

Comments

The function call is usually followed by "pack" command to place the spinner frame into a parent frame.  Be sure that "spinnerVar" is a unique name.

"n_incr" accepts any integer or double value, but if you will want to break it sending alpha, then the API is smart enough to reset it to 1.

 

See also

Widgets