home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / perl / TraverseToMenu.al < prev    next >
Encoding:
Text File  |  2004-02-15  |  821 b   |  28 lines

  1. # NOTE: Derived from blib\lib\Tk.pm.
  2. # Changes made here will be lost when autosplit is run again.
  3. # See AutoSplit.pm.
  4. package Tk;
  5.  
  6. #line 686 "blib\lib\Tk.pm (autosplit into blib\lib\auto\Tk\TraverseToMenu.al)"
  7. # tkTraverseToMenu --
  8. # This procedure implements keyboard traversal of menus. Given an
  9. # ASCII character "char", it looks for a menubutton with that character
  10. # underlined. If one is found, it posts the menubutton's menu
  11. #
  12. # Arguments:
  13. # w - Window in which the key was typed (selects
  14. # a toplevel window).
  15. # char - Character that selects a menu. The case
  16. # is ignored. If an empty string, nothing
  17. # happens.
  18. sub TraverseToMenu
  19. {
  20.  my $w = shift;
  21.  my $char = shift;
  22.  return unless(defined $char && $char ne '');
  23.  $w = $w->toplevel->FindMenu($char);
  24. }
  25.  
  26. # end of Tk::TraverseToMenu
  27. 1;
  28.