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

  1. # NOTE: Derived from ..\blib\lib\Tk\Listbox.pm.
  2. # Changes made here will be lost when autosplit is run again.
  3. # See AutoSplit.pm.
  4. package Tk::Listbox;
  5.  
  6. #line 775 "..\blib\lib\Tk\Listbox.pm (autosplit into ..\blib\lib\auto\Tk\Listbox\DataExtend.al)"
  7. # DataExtend
  8. #
  9. # This procedure is called for key-presses such as Shift-KEndData.
  10. # If the selection mode isn't multiple or extend then it does nothing.
  11. # Otherwise it moves the active element to el and, if we're in
  12. # extended mode, extends the selection to that point.
  13. #
  14. # Arguments:
  15. # w - The listbox widget.
  16. # el - An integer element number.
  17. sub DataExtend
  18. {
  19.  my $w = shift;
  20.  my $el = shift;
  21.  my $mode = $w->cget('-selectmode');
  22.  if ($mode eq 'extended')
  23.   {
  24.    $w->activate($el);
  25.    $w->see($el);
  26.    if ($w->selectionIncludes('anchor'))
  27.     {
  28.      $w->Motion($el)
  29.     }
  30.   }
  31.  elsif ($mode eq 'multiple')
  32.   {
  33.    $w->activate($el);
  34.    $w->see($el)
  35.   }
  36. }
  37.  
  38. # end of Tk::Listbox::DataExtend
  39. 1;
  40.