home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Editores / Perl5 / perl / lib / site / auto / Tk / Menubutton / Enter.al < prev    next >
Encoding:
Text File  |  1997-08-10  |  640 b   |  24 lines

  1. # NOTE: Derived from ..\blib\lib\Tk\Menubutton.pm.  Changes made here will be lost.
  2. package Tk::Menubutton;
  3.  
  4. # Enter --
  5. # This procedure is invoked when the mouse enters a menubutton
  6. # widget. It activates the widget unless it is disabled. Note:
  7. # this procedure is only invoked when mouse button 1 is *not* down.
  8. # The procedure B1Enter is invoked if the button is down.
  9. #
  10. # Arguments:
  11. # w - The name of the widget.
  12. sub Enter
  13. {
  14.  my $w = shift;
  15.  $Tk::inMenubutton->Leave if (defined $Tk::inMenubutton);
  16.  $Tk::inMenubutton = $w;
  17.  if ($w->cget("-state") ne "disabled")
  18.   {
  19.    $w->configure("-state","active")
  20.   }
  21. }
  22.  
  23. 1;
  24.