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

  1. # NOTE: Derived from ..\blib\lib\Tk\Scrollbar.pm.
  2. # Changes made here will be lost when autosplit is run again.
  3. # See AutoSplit.pm.
  4. package Tk::Scrollbar;
  5.  
  6. #line 403 "..\blib\lib\Tk\Scrollbar.pm (autosplit into ..\blib\lib\auto\Tk\Scrollbar\ScrlTopBottom.al)"
  7. # tkScrlTopBottom
  8. # Scroll to the top or bottom of the document, depending on the mouse
  9. # position.
  10. #
  11. # Arguments:
  12. # w -        The scrollbar widget.
  13. # x, y -    Mouse coordinates within the widget.
  14.  
  15. sub ScrlTopBottom
  16. {
  17.  my $w = shift;
  18.  my $e = $w->XEvent;
  19.  my $element = $w->identify($e->x,$e->y);
  20.  return unless ($element);
  21.  if ($element =~ /1$/)
  22.   {
  23.    $w->ScrlToPos(0);
  24.   }
  25.  elsif ($element =~ /2$/)
  26.   {
  27.    $w->ScrlToPos(1);
  28.   }
  29. }
  30.  
  31. 1;
  32. # end of Tk::Scrollbar::ScrlTopBottom
  33.