NAME
Tk::MinMaxScale - Two Scale(s) to get a (min, max) values pair
SYNOPSIS
$mms = $parent->MinMaxScale(-option => value, ... );
$mms = $parent->MinMaxScale( -variablemin => \$vn, -variablemax => \$vx, -labelmin => ..., -labelmax => ..., ..., );
$varmin = $mms->minvalue;
$mms->minvalue(10);
$varmax = $mms->maxvalue;
$mms->maxvalue($var);
DESCRIPTION
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 'minimum' is always less than or equal to the value of 'maximum'.
The purpose of Tk::MinMaxScale is to get a range of values narrower than the whole Scale range given by the options -from and -to (applied to both 'minimum' and 'maximum' Scale). This is done through 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.
OPTIONS
The widget accepts all options accepted by Scale (except -variable option), and their default value (except for -orient option wich defaults to 'horizontal'). In addition, the following option/value pairs are supported, but not required:
- -labelmin
-
The text used as a label for the 'minimum' Scale. Default none.
- -labelmax
-
The text used as a label for the 'maximum' Scale. Default none.
- -variablemin
-
A reference to a global variable linked with the 'minimum' Scale.
- -variablemax
-
A reference to a global variable linked with the 'maximum' Scale.
METHODS
- minvalue
-
Get the value of 'min' scale. With an argument, set the value of 'min' scale, bounded by '-from' and 'maxvalue' values.
- maxvalue
-
Get the value of 'max' scale. With an argument, set the value of 'max' scale, bounded by 'minvalue' and '-to' values.
HISTORY
- v0.06 - 2002/11/20
- v0.05 - 2002/11/05
- v0.04 - 2002/11/01
- v0.03 - 2002/11/01
- v0.02 - 2002/10/24
- v0.01 - 2002/10/17
TODO
- switch to a 'one groove, two sliders' scale.
AUTHOR
Jean-Pierre Vidal, <jeanpierre.vidal@free.fr>
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.
Feedback would be appreciated in many ways, including corrections to my poor english.
SEE ALSO
Tk::Scale
3 POD Errors
The following errors were encountered while parsing the POD:
- Around line 233:
You forgot a '=back' before '=head1'
- Around line 235:
'=item' outside of any '=over'
- Around line 302:
You forgot a '=back' before '=head1'