::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.
::hwat::widgets::spinner::Spinner frameName label spinnerVar
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 ). |
A variable associated with the spinner frame for packing purposes.
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
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.