%N ctrlset %F $MIR/src/subs/ctrl.for
%D Set the value of a control panel button, etc.
%P jm
%: user-interaction, control-panel
%B
      subroutine ctrlset(name, values, nvalues)

      implicit none
      integer nvalues
      integer values(nvalues)
      character name*(*)

  This changes the value for a particular button, etc, that appears
  on the control panel.  If the item type associated with name is a
  BUTTON, then only one value is accepted and represents the offset
  from the first BUTTON entry in the list for that name (i.e.
  value(1) = 0 is the first entry for that BUTTON, value(1) = 1
  is the second entry, etc.).  The list entry pointed to by the offset
  will be moved to the current BUTTON.  If the item type is a CURSOR,
  then up to two values will be accepted and represent the X and Y
  positions of the CURSOR.  If only one value is present, then both
  X and Y will be set to that value.  Finally, if the item type is a
  SLIDER and only one value is present, then the current value of the
  SLIDER will be set to that value.  If two values are present, then
  these values represent the new lower and upper limits of the SLIDER.

  NOTE: This routine ONLY is useful AFTER a call to CtrlView!!
  If CtrlView has not yet been called, no action will be performed.

  Inputs:
    Name     The name of the previously defined control panel item.
             This is the same name (including case) of the panel item
             defined in CtrlDef.
    values   An integer array of values used for setting the item.
    nvalues  The size of the values array.
