home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _9bfd0538f2e2029766cc21b160ce3f69 < prev    next >
Text File  |  2004-06-01  |  826b  |  32 lines

  1. # NOTE: Derived from ..\blib\lib\Tk\Scale.pm.
  2. # Changes made here will be lost when autosplit is run again.
  3. # See AutoSplit.pm.
  4. package Tk::Scale;
  5.  
  6. #line 255 "..\blib\lib\Tk\Scale.pm (autosplit into ..\blib\lib\auto\Tk\Scale\ControlPress.al)"
  7. # ControlPress --
  8. # This procedure handles button presses that are made with the Control
  9. # key down. Depending on the mouse position, it adjusts the scale
  10. # value to one end of the range or the other.
  11. #
  12. # Arguments:
  13. # w - The scale widget.
  14. # x, y - Mouse coordinates where the button was pressed.
  15. sub ControlPress
  16. {
  17.  my ($w,$x,$y) = @_;
  18.  my $el = $w->identify($x,$y);
  19.  return unless ($el);
  20.  if ($el eq 'trough1')
  21.   {
  22.    $w->set($w->cget('-from'))
  23.   }
  24.  elsif ($el eq 'trough2')
  25.   {
  26.    $w->set($w->cget('-to'))
  27.   }
  28. }
  29.  
  30. 1;
  31. # end of Tk::Scale::ControlPress
  32.