home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-perl-addon-1.4.9-installer.exe / ScrlTopBottom.al < prev    next >
Encoding:
Text File  |  2004-06-01  |  760 b   |  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.