home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _2b7eeaa1639d5eb101be9cc8f443ef26 < prev    next >
Encoding:
Text File  |  2004-06-01  |  815 b   |  34 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 86 "..\blib\lib\Tk\Scale.pm (autosplit into ..\blib\lib\auto\Tk\Scale\Activate.al)"
  7. # Activate --
  8. # This procedure is invoked to check a given x-y position in the
  9. # scale and activate the slider if the x-y position falls within
  10. # the slider.
  11. #
  12. # Arguments:
  13. # w - The scale widget.
  14. # x, y - Mouse coordinates.
  15. sub Activate
  16. {
  17.  my $w = shift;
  18.  my $x = shift;
  19.  my $y = shift;
  20.  return if ($w->cget('-state') eq 'disabled');
  21.  my $ident = $w->identify($x,$y);
  22.  if (defined($ident) && $ident eq 'slider')
  23.   {
  24.    $w->configure(-state => 'active')
  25.   }
  26.  else
  27.   {
  28.    $w->configure(-state => 'normal')
  29.   }
  30. }
  31.  
  32. # end of Tk::Scale::Activate
  33. 1;
  34.