home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _ccbe45895622c38f94efc8db65fcc7cf < prev    next >
Encoding:
Text File  |  2004-06-01  |  822 b   |  33 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 838 "..\blib\lib\Tk\Listbox.pm (autosplit into ..\blib\lib\auto\Tk\Listbox\SelectAll.al)"
  7. # SelectAll
  8. #
  9. # This procedure is invoked to handle the "select all" operation.
  10. # For single and browse mode, it just selects the active element.
  11. # Otherwise it selects everything in the widget.
  12. #
  13. # Arguments:
  14. # w - The listbox widget.
  15. sub SelectAll
  16. {
  17.  my $w = shift;
  18.  my $mode = $w->cget('-selectmode');
  19.  if ($mode eq 'single' || $mode eq 'browse')
  20.   {
  21.    $w->selectionClear(0,'end');
  22.    $w->selectionSet('active')
  23.   }
  24.  else
  25.   {
  26.    $w->selectionSet(0,'end')
  27.   }
  28.  $w->eventGenerate("<<ListboxSelect>>");
  29. }
  30.  
  31. # end of Tk::Listbox::SelectAll
  32. 1;
  33.