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.07 - 2002/11/21
- added tests.
v0.06 - 2002/11/20
- dropped "use warnings" and "use diagnostics".
- cleaned up the distribution package.
v0.05 - 2002/11/05
- unlike Scale, '-orient' option defaults now to 'horizontal'.
- like Scale, '-from' and '-to' options defaults now to 0 and 100, respectively.
- definitely (:() fixed Shift-key binding problems.
v0.04 - 2002/11/01
- enhanced methods minvalue and maxvalue to set|get the scale values.
v0.03 - 2002/11/01
- fixed some problems when dragging while depressing shift key
- added methods minvalue and maxvalue
v0.02 - 2002/10/24
- new feature added: dragging a slider while pressing a Shift key drags both sliders, locking their distance (an idea from Mark Lakata).
v0.01 - 2002/10/17
- first release.

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 311:

You forgot a '=back' before '=head1'