1mNAME0m
       scale - Create and manipulate scale widgets

1mSYNOPSIS0m
       1mscale 4m22mpathName24m ?4moptions24m?

1mSTANDARD OPTIONS0m
       1m-activebackground     -foreground          -relief0m
       1m-background           -highlightbackground -repeatdelay0m
       1m-borderwidth          -highlightcolor      -repeatinterval0m
       1m-cursor               -highlightthickness  -takefocus0m
       1m-font                 -orient              -troughcolor0m

       See the 1moptions 22mmanual entry for details on the standard options.

1mWIDGET-SPECIFIC OPTIONS0m
       Command-Line Name:1m-bigincrement0m
       Database Name:  1mbigIncrement0m
       Database Class: 1mBigIncrement0m

              Some  interactions  with  the scale cause its value to change by
              ``large'' increments;  this option specifies  the  size  of  the
              large  increments.   If  specified  as  0,  the large increments
              default to 1/10 the range of the scale.

       Command-Line Name:1m-command0m
       Database Name:  1mcommand0m
       Database Class: 1mCommand0m

              Specifies the prefix of a Tcl command  to  invoke  whenever  the
              scale's  value is changed via a widget command.  The actual com-
              mand consists of this option followed by a space and a real num-
              ber indicating the new value of the scale.

       Command-Line Name:1m-digits0m
       Database Name:  1mdigits0m
       Database Class: 1mDigits0m

              An  integer  specifying  how  many  significant digits should be
              retained when converting the value of the scale to a string.  If
              the  number  is less than or equal to zero, then the scale picks
              the smallest value that guarantees that  every  possible  slider
              position prints as a different string.

       Command-Line Name:1m-from0m
       Database Name:  1mfrom0m
       Database Class: 1mFrom0m

              A  real value corresponding to the left or top end of the scale.

       Command-Line Name:1m-label0m
       Database Name:  1mlabel0m
       Database Class: 1mLabel0m

              A string to display as a label  for  the  scale.   For  vertical
              scales  the  label is displayed just to the right of the top end
              of the scale.  For horizontal scales the label is displayed just
              above  the left end of the scale.  If the option is specified as
              an empty string, no label is displayed.

       Command-Line Name:1m-length0m
       Database Name:  1mlength0m
       Database Class: 1mLength0m

              Specifies the desired long dimension  of  the  scale  in  screen
              units  (i.e.  any of the forms acceptable to 1mTk_GetPixels22m).  For
              vertical scales this is  the  scale's  height;   for  horizontal
              scales it is the scale's width.

       Command-Line Name:1m-resolution0m
       Database Name:  1mresolution0m
       Database Class: 1mResolution0m

              A  real  value specifying the resolution for the scale.  If this
              value is greater than zero then the scale's value will always be
              rounded  to  an  even multiple of this value, as will tick marks
              and the endpoints of the scale.  If the value is less than  zero
              then no rounding occurs.  Defaults to 1 (i.e., the value will be
              integral).

       Command-Line Name:1m-showvalue0m
       Database Name:  1mshowValue0m
       Database Class: 1mShowValue0m

              Specifies a boolean value indicating whether or not the  current
              value of the scale is to be displayed.

       Command-Line Name:1m-sliderlength0m
       Database Name:  1msliderLength0m
       Database Class: 1mSliderLength0m

              Specfies  the size of the slider, measured in screen units along
              the slider's long dimension.  The value may be specified in  any
              of the forms acceptable to 1mTk_GetPixels22m.

       Command-Line Name:1m-sliderrelief0m
       Database Name:  1msliderRelief0m
       Database Class: 1mSliderRelief0m

              Specifies  the  relief  to  use when drawing the slider, such as
              1mraised 22mor 1msunken22m.

       Command-Line Name:1m-state0m
       Database Name:  1mstate0m
       Database Class: 1mState0m

              Specifies one of three states for the scale:  1mnormal22m, 1mactive22m, or
              1mdisabled22m.   If  the  scale is disabled then the value may not be
              changed and the scale won't activate.  If the scale  is  active,
              the slider is displayed using the color specified by the 1mactive-0m
              1mBackground 22moption.

       Command-Line Name:1m-tickinterval0m
       Database Name:  1mtickInterval0m
       Database Class: 1mTickInterval0m

              Must be a real value.  Determines the spacing between  numerical
              tick  marks displayed below or to the left of the slider.  If 0,
              no tick marks will be displayed.

       Command-Line Name:1m-to0m
       Database Name:  1mto0m
       Database Class: 1mTo0m

              Specifies a real value corresponding to the right or bottom  end
              of  the  scale.   This  value may be either less than or greater
              than the 1mfrom 22moption.

       Command-Line Name:1m-variable0m
       Database Name:  1mvariable0m
       Database Class: 1mVariable0m

              Specifies the name of a global variable to link  to  the  scale.
              Whenever  the  value  of  the  variable  changes, the scale will
              update to reflect this value.  Whenever the scale is manipulated
              interactively,  the  variable  will  be  modified to reflect the
              scale's new value.

       Command-Line Name:1m-width0m
       Database Name:  1mwidth0m
       Database Class: 1mWidth0m

              Specifies the desired narrow dimension of the trough  in  screen
              units  (i.e.  any of the forms acceptable to 1mTk_GetPixels22m).  For
              vertical scales this is  the  trough's  width;   for  horizontal
              scales this is the trough's height.


1mDESCRIPTION0m
       The 1mscale 22mcommand creates a new window (given by the 4mpathName24m argument)
       and makes it into a scale widget.  Additional options, described above,
       may  be specified on the command line or in the option database to con-
       figure aspects of the  scale  such  as  its  colors,  orientation,  and
       relief.   The 1mscale 22mcommand returns its 4mpathName24m argument.  At the time
       this command is invoked, there must not exist a window named  4mpathName24m,
       but 4mpathName24m's parent must exist.

       A  scale  is  a  widget  that displays a rectangular 4mtrough24m and a small
       4mslider24m.  The trough corresponds to a range of real  values  (determined
       by  the  1mfrom22m,  1mto22m,  and  1mresolution  22moptions), and the position of the
       slider selects a particular real value.   The  slider's  position  (and
       hence  the scale's value) may be adjusted with the mouse or keyboard as
       described in the BINDINGS section below.  Whenever the scale's value is
       changed,  a Tcl command is invoked (using the 1mcommand 22moption) to notify
       other interested widgets of the change.  In addition, the value of  the
       scale  can  be linked to a Tcl variable (using the 1mvariable 22moption), so
       that changes in either are reflected in the other.

       Three annotations may be displayed in a scale widget:  a label  appear-
       ing  at the top right of the widget (top left for horizontal scales), a
       number displayed just to the left of the slider (just above the  slider
       for  horizontal  scales), and a collection of numerical tick marks just
       to the left of the current value (just below the trough for  horizontal
       scales).   Each  of  these three annotations may be enabled or disabled
       using the configuration options.


1mWIDGET COMMAND0m
       The 1mscale 22mcommand creates a new Tcl command  whose  name  is  4mpathName24m.
       This  command  may  be used to invoke various operations on the widget.
       It has the following general form:
              4mpathName24m 4moption24m ?4marg24m 4marg24m 4m...24m?
       4mOption24m and the 4marg24ms determine the exact behavior of the  command.   The
       following commands are possible for scale widgets:

       4mpathName24m 1mcget 4m22moption0m
              Returns  the  current value of the configuration option given by
              4moption24m.  4mOption24m may have any of the values accepted by the 1mscale0m
              command.

       4mpathName24m 1mconfigure 22m?4moption24m? ?4mvalue24m 4moption24m 4mvalue24m 4m...24m?
              Query  or modify the configuration options of the widget.  If no
              4moption24m is specified, returns a list describing all of the avail-
              able  options for 4mpathName24m (see 1mTk_ConfigureInfo 22mfor information
              on the format of this list).  If 4moption24m  is  specified  with  no
              4mvalue24m,  then the command returns a list describing the one named
              option (this list will be identical to the corresponding sublist
              of  the  value  returned  if no 4moption24m is specified).  If one or
              more 4moption-value24m pairs are specified, then the command modifies
              the  given widget option(s) to have the given value(s);  in this
              case the command returns an empty string.  4mOption24m may  have  any
              of the values accepted by the 1mscale 22mcommand.

       4mpathName24m 1mcoords 22m?4mvalue24m?
              Returns a list whose elements are the x and y coordinates of the
              point along the centerline of the  trough  that  corresponds  to
              4mvalue24m.   If  4mvalue24m  is omitted then the scale's current value is
              used.

       4mpathName24m 1mget 22m?4mx24m 4my24m?
              If 4mx24m and 4my24m are omitted, returns the current value of the  scale.
              If 4mx24m and 4my24m are specified, they give pixel coordinates within the
              widget;  the command returns the scale  value  corresponding  to
              the  given  pixel.   Only one of 4mx24m or 4my24m is used:  for horizontal
              scales 4my24m is ignored, and for vertical scales 4mx24m is ignored.

       4mpathName24m 1midentify 4m22mx24m 4my0m
              Returns a string indicating what part of the  scale  lies  under
              the  coordinates  given  by  4mx24m  and 4my24m.  A return value of 1mslider0m
              means that the point is over the slider;  1mtrough1 22mmeans that the
              point is over the portion of the slider above  or to the left of
              the slider; and 1mtrough2 22mmeans that the point is over the portion
              of the slider below or to the right of the slider.  If the point
              isn't over one of these elements, an empty string is returned.

       4mpathName24m 1mset 4m22mvalue0m
              This command is invoked to  change  the  current  value  of  the
              scale,  and hence the position at which the slider is displayed.
              4mValue24m gives the new value for the scale.   The  command  has  no
              effect if the scale is disabled.


1mBINDINGS0m
       Tk  automatically  creates class bindings for scales that give them the
       following default behavior.  Where the behavior is different for verti-
       cal  and  horizontal  scales,  the  horizontal behavior is described in
       parentheses.

       [1]    If button 1 is pressed in the trough, the scale's value will  be
              incremented or decremented by the value of the 1mresolution 22moption
              so that the slider moves in the direction of the cursor.  If the
              button is held down, the action auto-repeats.

       [2]    If  button  1  is  pressed  over  the  slider, the slider can be
              dragged with the mouse.

       [3]    If button 1 is pressed in the trough with the Control key  down,
              the  slider  moves  all  the way to the end of its range, in the
              direction towards the mouse cursor.

       [4]    If button 2 is pressed, the scale's value is set  to  the  mouse
              position.   If  the  mouse  is  dragged  with button 2 down, the
              scale's value changes with the drag.

       [5]    The Up and Left keys move the slider up (left) by the  value  of
              the 1mresolution 22moption.

       [6]    The  Down  and  Right  keys  move the slider down (right) by the
              value of the 1mresolution 22moption.

       [7]    Control-Up and Control-Left move the slider  up  (left)  by  the
              value of the 1mbigIncrement 22moption.

       [8]    Control-Down  and  Control-Right move the slider down (right) by
              the value of the 1mbigIncrement 22moption.

       [9]    Home moves the slider to the top (left) end of its range.

       [10]   End moves the slider to the bottom (right) end of its range.

       If the scale is disabled using the 1mstate 22moption then none of the  above
       bindings have any effect.

       The  behavior  of  scales  can  be changed by defining new bindings for
       individual widgets or by redefining the class bindings.


1mKEYWORDS0m
