home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2004 July / APC0407D2.iso / workshop / apache / files / ActivePerl-5.6.1.638-MSWin32-x86.msi / _6b2cfefdd38a6e5e3fb9372de4cf1358 < prev    next >
Encoding:
Text File  |  2004-04-13  |  849 b   |  31 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 703 "..\blib\lib\Tk\Listbox.pm (autosplit into ..\blib\lib\auto\Tk\Listbox\ExtendUpDown.al)"
  7. # ExtendUpDown --
  8. #
  9. # Does nothing unless we're in extended selection mode; in this
  10. # case it moves the location cursor (active element) up or down by
  11. # one element, and extends the selection to that point.
  12. #
  13. # Arguments:
  14. # w - The listbox widget.
  15. # amount - +1 to move down one item, -1 to move back one item.
  16. sub ExtendUpDown
  17. {
  18.  my $w = shift;
  19.  my $amount = shift;
  20.  if ($w->cget('-selectmode') ne 'extended')
  21.   {
  22.    return;
  23.   }
  24.  $w->activate($w->index('active')+$amount);
  25.  $w->see('active');
  26.  $w->Motion($w->index('active'))
  27. }
  28.  
  29. # end of Tk::Listbox::ExtendUpDown
  30. 1;
  31.