Tk::MinMaxScale - Two Scale to get a (min, max) pair of values
$mms = $parent->MinMaxScale(-option => value, ... );
$mms = $parent->MinMaxScale( -variablemin => \$vn, -variablemax => \$vx, -labelmin => ..., -labelmax => ..., ..., );
$varmin = $mms->minvalue;
$varmax = $mms->maxvalue;
Tk::MinMaxScale is a Frame-based widget wrapping two Scale widgets, the first acting as a 'minimum' and the second as a 'maximum'. The value of the 'minimum' Scale is always less than or equal to the value of the 'maximum' Scale.
The purpose of Tk::MinMaxScale is to get a range of values narrower than the whole range given by the options -from and -to (which are applied to both 'minimum' and 'maximum' Scale). This is done through the variables associated to the options -variablemin and -variablemax, or via the methods minvalue and maxvalues, see below.
In addition, dragging a slider while pressing a Shift key drags both sliders, locking their distance. You must hold down the Shift key before dragging a slider.
The widget accepts all options accepted by Scale (except for -variable option), and their default value (with the exception for -orient option which defaults to 'horizontal').
In addition, the following option/value pairs are supported, but not required:
The text used as a label for the 'minimum' Scale. Default none.
The text used as a label for the 'maximum' Scale. Default none.
A reference to a global variable linked with the 'minimum' Scale.
A reference to a global variable linked with the 'maximum' Scale.
All other options are applied to both 'minimum' and 'maximum' Scale(s).
The MinMaxScale method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.
The following additional methods are available for MinMaxScale widgets:
If value is defined, sets the 'minimum' Scale of the widget to value (limited by '-from' value and the value of the 'maximum' Scale). Returns the value of the 'minimum' Scale.
If value is defined, sets the 'maximum' Scale of the widget to value (limited by the value of the 'minimum' Scale and '-to' value). Returns the value of the 'maximum' Scale.
At present, you are not allowed to configure -variablemin or -variablemax with a variable attached to another Tk::MinMaxScale widget.
Jean-Pierre Vidal, <firstname.lastname@example.org>
Feedback would be greatly appreciated, including typos, vocabulary and grammar.
This package is free software and is provided 'as is' without express or implied warranty. It may be used, modified, and redistributed under the same terms as Perl itself.